Skip to content

Commit 985404d

Browse files
committed
remove warnings
1 parent 1eea5c3 commit 985404d

10 files changed

Lines changed: 26 additions & 26 deletions

File tree

proofs/attempt.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static function($assert, $result, $e) {
301301
static fn() => null,
302302
),
303303
);
304-
$attempt->memoize();
304+
$_ = $attempt->memoize();
305305
$assert->same(1, $called);
306306

307307
$called = 0;
@@ -321,7 +321,7 @@ static function($assert, $result, $e) {
321321
static fn($value) => $value,
322322
),
323323
);
324-
$attempt->memoize();
324+
$_ = $attempt->memoize();
325325
$assert->same(1, $called);
326326
},
327327
);
@@ -346,12 +346,12 @@ static function($assert, $result1, $result2, $e1, $e2) {
346346
->recover(static fn() => Attempt::error($e2));
347347

348348
$assert->false($loaded);
349-
$attempt->maybe();
349+
$_ = $attempt->maybe();
350350
$assert->false($loaded);
351-
$attempt->either();
351+
$_ = $attempt->either();
352352
$assert->false($loaded);
353353

354-
$attempt->memoize();
354+
$_ = $attempt->memoize();
355355
$assert->true($loaded);
356356

357357
$assert->same(

proofs/either.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static function($assert, $value) {
2020
});
2121

2222
$assert->false($loaded);
23-
$either->memoize();
23+
$_ = $either->memoize();
2424
$assert->true($loaded);
2525
},
2626
);

proofs/maybe.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static function($assert, $value) {
5959
});
6060

6161
$assert->false($loaded);
62-
$maybe->memoize();
62+
$_ = $maybe->memoize();
6363
$assert->true($loaded);
6464
},
6565
);

proofs/sequence.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ static function($assert, $string, $chunk) {
7878
->split()
7979
->chunk($chunk);
8080

81-
$chunks->foreach(
81+
$_ = $chunks->foreach(
8282
static fn($chars) => $assert
8383
->number($chars->size())
8484
->lessThanOrEqual($chunk),
8585
);
86-
$chunks
86+
$_ = $chunks
8787
->dropEnd(1)
8888
->foreach(
8989
static fn($chars) => $assert->same(
@@ -160,7 +160,7 @@ static function($assert, $calls) {
160160
}
161161

162162
try {
163-
$sequence->toList();
163+
$_ = $sequence->toList();
164164
$assert->fail('it should throw');
165165
} catch (Exception $e) {
166166
$assert->same($expected, $e);

properties/Sequence/Windows.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function applicableTo(object $systemUnderTest): bool
3636

3737
public function ensureHeldBy(Assert $assert, object $systemUnderTest): object
3838
{
39-
$systemUnderTest
39+
$_ = $systemUnderTest
4040
->windows($this->size)
4141
->foreach(
4242
fn($window) => $assert
@@ -46,7 +46,7 @@ public function ensureHeldBy(Assert $assert, object $systemUnderTest): object
4646
);
4747

4848
if ($systemUnderTest->size() >= $this->size) {
49-
$systemUnderTest
49+
$_ = $systemUnderTest
5050
->windows($this->size)
5151
->foreach(fn($window) => $assert->same(
5252
$this->size,

tests/MapTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function testForeach()
187187
->put(3, 4);
188188
$count = 0;
189189

190-
$m->foreach(function(int $key, int $value) use (&$count) {
190+
$_ = $m->foreach(function(int $key, int $value) use (&$count) {
191191
$this->assertSame($count, $key);
192192
$this->assertSame($value, $key + 1);
193193
++$count;

tests/MaybeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ public function testAllMapNotCalledWhenOneNothingIsPresent(): BlackBox\Proof
430430

431431
$this->assertInstanceOf(Maybe\Comprehension::class, $comprehension);
432432
$called = false;
433-
$comprehension->map(static function(...$args) use (&$called) {
433+
$_ = $comprehension->map(static function(...$args) use (&$called) {
434434
$called = true;
435435

436436
return $args[0];
@@ -453,7 +453,7 @@ public function testAllFlatMapNotCalledWhenOneNothingIsPresent(): BlackBox\Proof
453453

454454
$this->assertInstanceOf(Maybe\Comprehension::class, $comprehension);
455455
$called = false;
456-
$comprehension->flatMap(static function(...$args) use (&$called) {
456+
$_ = $comprehension->flatMap(static function(...$args) use (&$called) {
457457
$called = true;
458458

459459
return Maybe::just($args[0]);

tests/RegExpTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testThrowWhenInvalidRegexp()
3232
{
3333
$this->expectException(LogicException::class);
3434

35-
RegExp::of('/foo');
35+
$_ = RegExp::of('/foo');
3636
}
3737

3838
public function testMatches()

tests/SequenceTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ public function testSafeguard()
10201020
$stop = new \Exception;
10211021

10221022
try {
1023-
Sequence::of(1, 2, 3, 1)->safeguard(
1023+
$_ = Sequence::of(1, 2, 3, 1)->safeguard(
10241024
Set::of(),
10251025
static fn($unique, $value) => match ($unique->contains($value)) {
10261026
true => throw $stop,
@@ -1048,7 +1048,7 @@ public function testSafeguard()
10481048
},
10491049
);
10501050
$this->assertFalse($loaded);
1051-
$sequence->toList();
1051+
$_ = $sequence->toList();
10521052
$this->fail('it should throw');
10531053
} catch (\Exception $e) {
10541054
$this->assertSame($stop, $e);
@@ -1070,7 +1070,7 @@ public function testSafeguard()
10701070
},
10711071
);
10721072
$this->assertFalse($loaded);
1073-
$sequence->toList();
1073+
$_ = $sequence->toList();
10741074
$this->fail('it should throw');
10751075
} catch (\Exception $e) {
10761076
$this->assertSame($stop, $e);
@@ -1134,12 +1134,12 @@ public function testAggregate()
11341134
$lines->toList(),
11351135
);
11361136
$this->assertSame(1, $loaded);
1137-
$lines->toList();
1137+
$_ = $lines->toList();
11381138
$this->assertSame(2, $loaded);
11391139
});
11401140

11411141
try {
1142-
Str::of("foo\nbar\nbaz")
1142+
$_ = Str::of("foo\nbar\nbaz")
11431143
->chunk(1)
11441144
->aggregate(static fn() => Sequence::of())
11451145
->toList();

tests/SetTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function testAdd()
9191
$s = Set::of()->add(42);
9292

9393
$this->assertSame(1, $s->size());
94-
$s->add(24);
94+
$_ = $s->add(24);
9595
$this->assertSame(1, $s->size());
9696
$s = $s->add(24);
9797
$this->assertInstanceOf(Set::class, $s);
@@ -231,7 +231,7 @@ public function testForeach()
231231
->add(4);
232232
$count = 0;
233233

234-
$s->foreach(function(int $v) use (&$count) {
234+
$_ = $s->foreach(function(int $v) use (&$count) {
235235
$this->assertSame(++$count, $v);
236236
});
237237
$this->assertSame(4, $count);
@@ -557,7 +557,7 @@ public function testSafeguard()
557557
$stop = new \Exception;
558558

559559
try {
560-
Set::of(new \ArrayObject([1]), new \ArrayObject([2]), new \ArrayObject([3]), new \ArrayObject([1]))->safeguard(
560+
$_ = Set::of(new \ArrayObject([1]), new \ArrayObject([2]), new \ArrayObject([3]), new \ArrayObject([1]))->safeguard(
561561
Set::of(),
562562
static fn($unique, $value) => match ($unique->contains($value[0])) {
563563
true => throw $stop,
@@ -587,7 +587,7 @@ public function testSafeguard()
587587
},
588588
);
589589
$this->assertFalse($loaded);
590-
$set->toList();
590+
$_ = $set->toList();
591591
$this->fail('it should throw');
592592
} catch (\Exception $e) {
593593
$this->assertSame($stop, $e);
@@ -609,7 +609,7 @@ public function testSafeguard()
609609
},
610610
);
611611
$this->assertFalse($loaded);
612-
$set->toList();
612+
$_ = $set->toList();
613613
$this->fail('it should throw');
614614
} catch (\Exception $e) {
615615
$this->assertSame($stop, $e);

0 commit comments

Comments
 (0)