diff --git a/src/ArrayAccessible.php b/src/ArrayAccessible.php index 84520e0..5220c60 100644 --- a/src/ArrayAccessible.php +++ b/src/ArrayAccessible.php @@ -14,22 +14,16 @@ class ArrayAccessible implements ArrayAccess, IteratorAggregate { - /** - * @var mixed[] - */ + /** @var mixed[] */ private $array; - /** - * @param mixed[] $array - */ + /** @param mixed[] $array */ public function __construct(array $array = []) { $this->array = $array; } - /** - * @param mixed $offset - */ + /** @param mixed $offset */ public function offsetExists($offset): bool { return array_key_exists($offset, $this->array); @@ -59,17 +53,13 @@ public function offsetSet($offset, $value): void } } - /** - * @param mixed $offset - */ + /** @param mixed $offset */ public function offsetUnset($offset): void { unset($this->array[$offset]); } - /** - * @return mixed[] - */ + /** @return mixed[] */ public function getIterator(): Traversable { return new ArrayIterator($this->array); diff --git a/src/Constraint/ArraySubset.php b/src/Constraint/ArraySubset.php index 4e04156..4a9cd49 100644 --- a/src/Constraint/ArraySubset.php +++ b/src/Constraint/ArraySubset.php @@ -27,19 +27,13 @@ */ final class ArraySubset extends Constraint { - /** - * @var iterable|mixed[] - */ + /** @var iterable|mixed[] */ private $subset; - /** - * @var bool - */ + /** @var bool */ private $strict; - /** - * @param mixed[] $subset - */ + /** @param mixed[] $subset */ public function __construct(iterable $subset, bool $strict = false) { $this->strict = $strict; @@ -63,7 +57,7 @@ public function __construct(iterable $subset, bool $strict = false) * @throws ExpectationFailedException * @throws InvalidArgumentException|Exception */ - public function evaluate($other, string $description = '', bool $returnResult = false): ?bool + public function evaluate($other, string $description = '', bool $returnResult = false): bool|null { //type cast $other & $this->subset as an array to allow //support in standard array functions. diff --git a/tests/Unit/AssertTest.php b/tests/Unit/AssertTest.php index cda1079..f1ad90c 100644 --- a/tests/Unit/AssertTest.php +++ b/tests/Unit/AssertTest.php @@ -15,9 +15,7 @@ use function class_exists; use function method_exists; -/** - * @requires PHPUnit >= 8 - */ +/** @requires PHPUnit >= 8 */ final class AssertTest extends TestCase { public function testAssertArraySubsetPassesStrictConfig(): void diff --git a/tests/Unit/Constraint/ArraySubsetTest.php b/tests/Unit/Constraint/ArraySubsetTest.php index 57d7bea..578370c 100644 --- a/tests/Unit/Constraint/ArraySubsetTest.php +++ b/tests/Unit/Constraint/ArraySubsetTest.php @@ -17,14 +17,10 @@ use function sprintf; -/** - * @requires PHPUnit >= 8 - */ +/** @requires PHPUnit >= 8 */ final class ArraySubsetTest extends TestCase { - /** - * @return mixed[] - */ + /** @return mixed[] */ public static function evaluateDataProvider(): array { return [