We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4297dc5 commit fcc50b9Copy full SHA for fcc50b9
rules-tests/CodeQuality/Rector/CallLike/DirectInstanceOverMockArgRector/Fixture/skip_array_item_foreach_value.php.inc
@@ -0,0 +1,28 @@
1
+<?php
2
+
3
+namespace Rector\PHPUnit\Tests\CodeQuality\Rector\CallLike\DirectInstanceOverMockArgRector\Fixture;
4
5
+use PHPUnit\Framework\TestCase;
6
7
+final class SomeCrashArray extends TestCase
8
+{
9
+ private const array TIME_UNITS = [
10
+ ['weeks', 604800],
11
+ ['days', 86400],
12
+ ['hours', 3600],
13
+ ['minutes', 60],
14
+ ['seconds', 1],
15
+ ];
16
17
+ public function testThat($product)
18
+ {
19
+ foreach (self::TIME_UNITS as [$unit, $seconds]) {
20
+ if ($product % $seconds === 0) {
21
+ return [
22
+ 'unit' => (string) $unit,
23
+ 'value' => (int) ($product / $seconds),
24
25
+ }
26
27
28
+}
0 commit comments