Skip to content

Commit

Permalink
bump: update PHPQA to 1.59.2 (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarlovi authored Aug 24, 2021
1 parent ccc1d9d commit 3e64777
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Exception/MappingException.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public static function missingHeaderOption(): self
return new self('When using HeaderReference, "header" option is required');
}

/**
* @param array<string> $columns
*/
public static function ambiguousHeader(string $header, array $columns): self
{
return new self(sprintf('Ambiguous header "%1$s" found, used in columns "%2$s"', $header, implode('", "', $columns)));
Expand Down
10 changes: 8 additions & 2 deletions Test/FilterIteratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ public function testCanFilterOutIteratorItems(): void
{
$iterator = new FakeIterator([1, 2, 3, 4, 5]);
$filter = new FilterIterator($iterator, static function (object $item): bool {
/** @var int $scalar */
/**
* @var int $scalar
* @phpstan-ignore-next-line
*/
$scalar = $item->scalar;

return $scalar % 2 === 0;
Expand All @@ -42,7 +45,10 @@ public function testCallbackReturnValueMustBeBool(): void
{
$iterator = new FakeIterator(['ba', 'abba', 'boo', 'bae', 'nba', 'ab', 'ban']);
$filter = new FilterIterator($iterator, static function (object $item): bool {
/** @var string $scalar */
/**
* @var string $scalar
* @phpstan-ignore-next-line
*/
$scalar = $item->scalar;

return false !== mb_strpos($scalar, 'ba');
Expand Down
1 change: 1 addition & 0 deletions Test/FixtureTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ private function invalidFixture(string $name): \SplFileObject
return new class(__DIR__.'/resources/fixtures/'.$name) extends \SplFileObject {
/**
* @psalm-suppress ImplementedReturnTypeMismatch Invalid by design
* @phpstan-ignore-next-line
*/
public function getRealPath(): bool
{
Expand Down
6 changes: 0 additions & 6 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,3 @@ parameters:
excludes_analyse:
- var/
- vendor/
ignoreErrors:
- message: '#Access to an undefined property object\:\:\$scalar\.#'
path: %currentWorkingDirectory%/Test/FilterIteratorTest.php
- message: '#Return type \(bool\) of method class@anonymous\/Test\/FixtureTrait\.php:28::getRealPath\(\) should be covariant with return type \(string\|false\) of method SplFileInfo::getRealPath\(\)#'
paths:
- %currentWorkingDirectory%/Test/Functional/FunctionalTestCase.php
2 changes: 1 addition & 1 deletion psalm.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<psalm xmlns="https://getpsalm.org/schema/config"
cacheDirectory="var/psalm"
totallyTyped="true">
errorLevel="1">
<projectFiles>
<directory name="."/>
<ignoreFiles>
Expand Down

0 comments on commit 3e64777

Please sign in to comment.