Skip to content

Commit c26a928

Browse files
authored
Merge pull request #26 from nynka/main
Fix Psalm Crash by Removing Equals Sign in @param Annotations
2 parents c435bae + 5a44124 commit c26a928

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
/build/logs/*
88
/.phpunit.result.cache
99
/.phpunit.cache
10+
/.idea/

src/AtLeast.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class AtLeast
1111
{
1212
/**
1313
* @param array<int|string, mixed>|Traversable<int|string, mixed> $data
14-
* @param callable(mixed $datum, int|string|null $key=): bool $filter
14+
* @param callable(mixed $datum, int|string|null $key): bool $filter
1515
*/
1616
public static function once(iterable $data, callable $filter): bool
1717
{
@@ -20,7 +20,7 @@ public static function once(iterable $data, callable $filter): bool
2020

2121
/**
2222
* @param array<int|string, mixed>|Traversable<int|string, mixed> $data
23-
* @param callable(mixed $datum, int|string|null $key=): bool $filter
23+
* @param callable(mixed $datum, int|string|null $key): bool $filter
2424
*/
2525
public static function twice(iterable $data, callable $filter): bool
2626
{
@@ -29,7 +29,7 @@ public static function twice(iterable $data, callable $filter): bool
2929

3030
/**
3131
* @param array<int|string, mixed>|Traversable<int|string, mixed> $data
32-
* @param callable(mixed $datum, int|string|null $key=): bool $filter
32+
* @param callable(mixed $datum, int|string|null $key): bool $filter
3333
*/
3434
public static function times(iterable $data, callable $filter, int $count): bool
3535
{
@@ -38,7 +38,7 @@ public static function times(iterable $data, callable $filter, int $count): bool
3838

3939
/**
4040
* @param array<int|string, mixed>|Traversable<int|string, mixed> $data
41-
* @param callable(mixed $datum, int|string|null $key=): bool $filter
41+
* @param callable(mixed $datum, int|string|null $key): bool $filter
4242
*/
4343
private static function atLeastFoundTimes(
4444
iterable $data,

src/Collector.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ final class Collector
1414
/** @var array<int|string, mixed>|Traversable<int|string, mixed> */
1515
private iterable $data = [];
1616

17-
/** @var null|callable(mixed $datum, int|string|null $key=): bool */
17+
/** @var null|callable(mixed $datum, int|string|null $key): bool */
1818
private $when;
1919

20-
/** @var null|callable(mixed $datum, int|string|null $key=): mixed */
20+
/** @var null|callable(mixed $datum, int|string|null $key): mixed */
2121
private $transform;
2222

2323
private ?int $limit = null;
@@ -34,7 +34,7 @@ public static function setUp(iterable $data): self
3434
}
3535

3636
/**
37-
* @param callable(mixed $datum, int|string|null $key=): bool $filter
37+
* @param callable(mixed $datum, int|string|null $key): bool $filter
3838
*/
3939
public function when(callable $filter): self
4040
{
@@ -51,7 +51,7 @@ public function withLimit(int $limit): self
5151
}
5252

5353
/**
54-
* @param callable(mixed $datum, int|string|null $key=): mixed $transform
54+
* @param callable(mixed $datum, int|string|null $key): mixed $transform
5555
*/
5656
public function withTransform(callable $transform): self
5757
{
@@ -74,7 +74,7 @@ public function getResults(): array
7474
foreach ($this->data as $key => $datum) {
7575
if ($isCallableWhen) {
7676
/**
77-
* @var callable(mixed $datum, int|string|null $key=): bool $when
77+
* @var callable(mixed $datum, int|string|null $key): bool $when
7878
*/
7979
$when = $this->when;
8080
$isFound = ($when)($datum, $key);

src/Finder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class Finder
2020
{
2121
/**
2222
* @param array<int|string, mixed>|Traversable<int|string, mixed> $data
23-
* @param callable(mixed $datum, int|string|null $key=): bool $filter
23+
* @param callable(mixed $datum, int|string|null $key): bool $filter
2424
*/
2525
public static function first(iterable $data, callable $filter, bool $returnKey = false): mixed
2626
{
@@ -55,7 +55,7 @@ private static function resolveArrayFromTraversable(Traversable $traversable): a
5555

5656
/**
5757
* @param array<int|string, mixed>|Traversable<int|string, mixed> $data
58-
* @param callable(mixed $datum, int|string|null $key=): bool $filter
58+
* @param callable(mixed $datum, int|string|null $key): bool $filter
5959
*/
6060
public static function last(
6161
iterable $data,
@@ -120,7 +120,7 @@ public static function last(
120120

121121
/**
122122
* @param array<int|string, mixed>|Traversable<int|string, mixed> $data
123-
* @param callable(mixed $datum, int|string|null $key=): bool $filter
123+
* @param callable(mixed $datum, int|string|null $key): bool $filter
124124
* @return mixed[]
125125
*/
126126
public static function rows(

src/Only.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class Only
1111
{
1212
/**
1313
* @param array<int|string, mixed>|Traversable<int|string, mixed> $data
14-
* @param callable(mixed $datum, int|string|null $key=): bool $filter
14+
* @param callable(mixed $datum, int|string|null $key): bool $filter
1515
*/
1616
public static function once(iterable $data, callable $filter): bool
1717
{
@@ -20,7 +20,7 @@ public static function once(iterable $data, callable $filter): bool
2020

2121
/**
2222
* @param array<int|string, mixed>|Traversable<int|string, mixed> $data
23-
* @param callable(mixed $datum, int|string|null $key=): bool $filter
23+
* @param callable(mixed $datum, int|string|null $key): bool $filter
2424
*/
2525
public static function twice(iterable $data, callable $filter): bool
2626
{
@@ -29,7 +29,7 @@ public static function twice(iterable $data, callable $filter): bool
2929

3030
/**
3131
* @param array<int|string, mixed>|Traversable<int|string, mixed> $data
32-
* @param callable(mixed $datum, int|string|null $key=): bool $filter
32+
* @param callable(mixed $datum, int|string|null $key): bool $filter
3333
*/
3434
public static function times(iterable $data, callable $filter, int $count): bool
3535
{
@@ -38,7 +38,7 @@ public static function times(iterable $data, callable $filter, int $count): bool
3838

3939
/**
4040
* @param array<int|string, mixed>|Traversable<int|string, mixed> $data
41-
* @param callable(mixed $datum, int|string|null $key=): bool $filter
41+
* @param callable(mixed $datum, int|string|null $key): bool $filter
4242
*/
4343
private static function onlyFoundTimes(
4444
iterable $data,

0 commit comments

Comments
 (0)