Skip to content

Commit 264f4d4

Browse files
committed
Apply Doctrine Standard
1 parent 69347ab commit 264f4d4

File tree

4 files changed

+12
-34
lines changed

4 files changed

+12
-34
lines changed

src/ArrayAccessible.php

+5-15
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,16 @@
1414

1515
class ArrayAccessible implements ArrayAccess, IteratorAggregate
1616
{
17-
/**
18-
* @var mixed[]
19-
*/
17+
/** @var mixed[] */
2018
private $array;
2119

22-
/**
23-
* @param mixed[] $array
24-
*/
20+
/** @param mixed[] $array */
2521
public function __construct(array $array = [])
2622
{
2723
$this->array = $array;
2824
}
2925

30-
/**
31-
* @param mixed $offset
32-
*/
26+
/** @param mixed $offset */
3327
public function offsetExists($offset): bool
3428
{
3529
return array_key_exists($offset, $this->array);
@@ -59,17 +53,13 @@ public function offsetSet($offset, $value): void
5953
}
6054
}
6155

62-
/**
63-
* @param mixed $offset
64-
*/
56+
/** @param mixed $offset */
6557
public function offsetUnset($offset): void
6658
{
6759
unset($this->array[$offset]);
6860
}
6961

70-
/**
71-
* @return mixed[]
72-
*/
62+
/** @return mixed[] */
7363
public function getIterator(): Traversable
7464
{
7565
return new ArrayIterator($this->array);

src/Constraint/ArraySubset.php

+4-10
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,13 @@
2727
*/
2828
final class ArraySubset extends Constraint
2929
{
30-
/**
31-
* @var iterable|mixed[]
32-
*/
30+
/** @var iterable|mixed[] */
3331
private $subset;
3432

35-
/**
36-
* @var bool
37-
*/
33+
/** @var bool */
3834
private $strict;
3935

40-
/**
41-
* @param mixed[] $subset
42-
*/
36+
/** @param mixed[] $subset */
4337
public function __construct(iterable $subset, bool $strict = false)
4438
{
4539
$this->strict = $strict;
@@ -63,7 +57,7 @@ public function __construct(iterable $subset, bool $strict = false)
6357
* @throws ExpectationFailedException
6458
* @throws InvalidArgumentException|Exception
6559
*/
66-
public function evaluate($other, string $description = '', bool $returnResult = false): ?bool
60+
public function evaluate($other, string $description = '', bool $returnResult = false): bool|null
6761
{
6862
//type cast $other & $this->subset as an array to allow
6963
//support in standard array functions.

tests/Unit/AssertTest.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
use function class_exists;
1616
use function method_exists;
1717

18-
/**
19-
* @requires PHPUnit >= 8
20-
*/
18+
/** @requires PHPUnit >= 8 */
2119
final class AssertTest extends TestCase
2220
{
2321
public function testAssertArraySubsetPassesStrictConfig(): void

tests/Unit/Constraint/ArraySubsetTest.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@
1717

1818
use function sprintf;
1919

20-
/**
21-
* @requires PHPUnit >= 8
22-
*/
20+
/** @requires PHPUnit >= 8 */
2321
final class ArraySubsetTest extends TestCase
2422
{
25-
/**
26-
* @return mixed[]
27-
*/
23+
/** @return mixed[] */
2824
public static function evaluateDataProvider(): array
2925
{
3026
return [

0 commit comments

Comments
 (0)