diff --git a/composer.json b/composer.json index 5e00c575..b92a0b7e 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/PhpPact/FFI/Model/ArrayData.php b/src/PhpPact/FFI/Model/ArrayData.php index 06632509..4058445d 100644 --- a/src/PhpPact/FFI/Model/ArrayData.php +++ b/src/PhpPact/FFI/Model/ArrayData.php @@ -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); diff --git a/tests/PhpPact/FFI/Model/ArrayDataTest.php b/tests/PhpPact/FFI/Model/ArrayDataTest.php index 4cf15547..8d860a92 100644 --- a/tests/PhpPact/FFI/Model/ArrayDataTest.php +++ b/tests/PhpPact/FFI/Model/ArrayDataTest.php @@ -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])); } }