Skip to content

Commit

Permalink
Merge pull request #709 from tienvx/fix-phpstan-no-error-to-ignore
Browse files Browse the repository at this point in the history
fix: Fix PHPStan no error to ignore
  • Loading branch information
tienvx authored Dec 20, 2024
2 parents b1437cc + 1e82641 commit 4528ed9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"ext-sockets": "*",
"roave/security-advisories": "dev-latest",
"friendsofphp/php-cs-fixer": "^3.0",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan": "^2.0.4",
"phpunit/phpunit": "^10.1.0|^11.0",
"guzzlehttp/guzzle": "^7.8",
"behat/behat": "^3.13",
Expand Down
2 changes: 1 addition & 1 deletion src/PhpPact/FFI/Model/ArrayData.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static function createFrom(array $values): ?self
throw new CDataNotCreatedException();
}
FFI::memcpy($item, $value, $length);
$items[$index++] = $item; // @phpstan-ignore-line
$items[$index++] = $item;
}

return new self($items, $size);
Expand Down
2 changes: 1 addition & 1 deletion tests/PhpPact/FFI/Model/ArrayDataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function testCreateFromArray(): void
$this->assertInstanceOf(ArrayData::class, $arrayData);
$this->assertSame(count($branches), $arrayData->getSize());
foreach ($branches as $index => $branch) {
// @phpstan-ignore offsetAccess.nonOffsetAccessible,argument.type
// @phpstan-ignore argument.type
$this->assertSame($branch, FFI::string($arrayData->getItems()[$index]));
}
}
Expand Down

0 comments on commit 4528ed9

Please sign in to comment.