Passed
Push — php8 ( bb7e6a )
by Donald
02:54
created
test/Unit/Chekote/NounStore/Store/KeyExistsTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@
 block discarded – undo
34 34
     {
35 35
         return [
36 36
             // key,           value                          exists?
37
-            [ 'No such key',  null,                          false ], // missing key
38
-            [ StoreTest::KEY, StoreTest::$MOST_RECENT_VALUE, true  ], // present key
37
+            ['No such key', null, false], // missing key
38
+            [StoreTest::KEY, StoreTest::$MOST_RECENT_VALUE, true], // present key
39 39
         ];
40 40
     }
41 41
 
Please login to merge, or discard this patch.
test/Unit/Chekote/NounStore/Store/KeyValueContainsTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@
 block discarded – undo
34 34
     {
35 35
         return [
36 36
             // storedValue,      checkedValue, expectedResult
37
-            [ 'This is a value', 'is a',       true           ],
38
-            [ 'This is a value', 'words',      false          ],
37
+            ['This is a value', 'is a', true],
38
+            ['This is a value', 'words', false],
39 39
         ];
40 40
     }
41 41
 
Please login to merge, or discard this patch.
test/Unit/Chekote/Phake/Stubber/Answers/UnMockedResponseExceptionAnswer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     {
16 16
         $class = get_parent_class($context);
17 17
 
18
-        return function () use ($class, $method) {
18
+        return function() use ($class, $method) {
19 19
             throw new UnMockedResponseException(
20 20
                 "$class::$method was called on mock without having its response mocked"
21 21
             );
Please login to merge, or discard this patch.
test/Unit/Chekote/NounStore/Store/GetTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -60,15 +60,15 @@
 block discarded – undo
60 60
     {
61 61
         return [
62 62
             //                                                     key                                        parsed key                                  expected
63
-            'Noun without index returns most recent noun'      => [StoreTest::KEY,                            [[StoreTest::KEY, null]],                   StoreTest::$MOST_RECENT_VALUE],
64
-            'Noun with index returns specific noun'            => ['1st ' . StoreTest::KEY,                   [[StoreTest::KEY,    0]],                   StoreTest::$FIRST_VALUE],
65
-            'Non-existent noun returns null'                   => ['3rd ' . StoreTest::KEY,                   [[StoreTest::KEY,    2]],                   null],
66
-            'Possessive noun w/o index string property'        => [StoreTest::KEY . "'s color",               [[StoreTest::KEY, null], ['color', null]],  'Blue'],
67
-            'Possessive noun with index string property'       => ['1st ' . StoreTest::KEY . "'s color",      [[StoreTest::KEY, 0], ['color', null]],     'Red'],
68
-            'Possessive noun w/o index collection w/o index'   => [StoreTest::KEY . "'s option",              [[StoreTest::KEY, null], ['option', null]], ['Cruise Control', 'Air Conditioning']],
69
-            'Possessive noun with index collection w/o index'  => ['1st ' . StoreTest::KEY . "'s option",     [[StoreTest::KEY, 0], ['option', null]],    ['GPS', 'Heated Seats']],
70
-            'Possessive noun w/o index collection with index'  => [StoreTest::KEY . "'s 1st option",          [[StoreTest::KEY, null], ['option', 0]],    'Cruise Control'],
71
-            'Possessive noun with index collection with index' => ['1st ' . StoreTest::KEY . "'s 1st option", [[StoreTest::KEY, 0], ['option', 0]],       'GPS'],
63
+            'Noun without index returns most recent noun'      => [StoreTest::KEY, [[StoreTest::KEY, null]], StoreTest::$MOST_RECENT_VALUE],
64
+            'Noun with index returns specific noun'            => ['1st ' . StoreTest::KEY, [[StoreTest::KEY, 0]], StoreTest::$FIRST_VALUE],
65
+            'Non-existent noun returns null'                   => ['3rd ' . StoreTest::KEY, [[StoreTest::KEY, 2]], null],
66
+            'Possessive noun w/o index string property'        => [StoreTest::KEY . "'s color", [[StoreTest::KEY, null], ['color', null]], 'Blue'],
67
+            'Possessive noun with index string property'       => ['1st ' . StoreTest::KEY . "'s color", [[StoreTest::KEY, 0], ['color', null]], 'Red'],
68
+            'Possessive noun w/o index collection w/o index'   => [StoreTest::KEY . "'s option", [[StoreTest::KEY, null], ['option', null]], ['Cruise Control', 'Air Conditioning']],
69
+            'Possessive noun with index collection w/o index'  => ['1st ' . StoreTest::KEY . "'s option", [[StoreTest::KEY, 0], ['option', null]], ['GPS', 'Heated Seats']],
70
+            'Possessive noun w/o index collection with index'  => [StoreTest::KEY . "'s 1st option", [[StoreTest::KEY, null], ['option', 0]], 'Cruise Control'],
71
+            'Possessive noun with index collection with index' => ['1st ' . StoreTest::KEY . "'s 1st option", [[StoreTest::KEY, 0], ['option', 0]], 'GPS'],
72 72
         ];
73 73
     }
74 74
 }
Please login to merge, or discard this patch.
src/Chekote/NounStore/Store.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 
59 59
         return array_reduce(
60 60
             $this->keyService->parse($key),
61
-            static function ($carry, $item) use (&$i) {
61
+            static function($carry, $item) use (&$i) {
62 62
                 list($noun, $index) = $item;
63 63
 
64 64
                 $carry = data_get($carry, $noun);
Please login to merge, or discard this patch.
test/Unit/Chekote/NounStore/Store/KeyIsClassTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@
 block discarded – undo
35 35
     {
36 36
         return [
37 37
             // storedValue,      checkedValue, expectedResult
38
-            [ new stdClass(), stdClass::class,        true   ],
39
-            [ new stdClass(), KeyIsClassTest::class,  false  ],
38
+            [new stdClass(), stdClass::class, true],
39
+            [new stdClass(), KeyIsClassTest::class, false],
40 40
         ];
41 41
     }
42 42
 
Please login to merge, or discard this patch.
test/Unit/Chekote/NounStore/Key/ParseNounTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@
 block discarded – undo
25 25
     {
26 26
         return [
27 27
             // key          parsedKey,  parsedIndex
28
-            ['Thing',       'Thing',           null],
29
-            ['1st Thing',   'Thing',              0],
30
-            ['2nd Thing',   'Thing',              1],
31
-            ['3rd Thing',   'Thing',              2],
32
-            ['4th Thing',   'Thing',              3],
33
-            ['10th Thing',  'Thing',              9],
34
-            ['478th Thing', 'Thing',            477],
28
+            ['Thing', 'Thing', null],
29
+            ['1st Thing', 'Thing', 0],
30
+            ['2nd Thing', 'Thing', 1],
31
+            ['3rd Thing', 'Thing', 2],
32
+            ['4th Thing', 'Thing', 3],
33
+            ['10th Thing', 'Thing', 9],
34
+            ['478th Thing', 'Thing', 477],
35 35
         ];
36 36
     }
37 37
 
Please login to merge, or discard this patch.
test/Integration/Chekote/NounStore/Store/GetTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -75,15 +75,15 @@
 block discarded – undo
75 75
     public function happyPathDataProvider(): array
76 76
     {
77 77
         return [
78
-            'Noun'                       => ['Person',               self::$alice,                'Alice is the most recent Person in the store'],
79
-            'Nth Noun'                   => ['1st Person',           self::$bob,                  'Bob is the 1st Person in the store'],
80
-            'Related Noun'               => ["Person's car",         [self::$ford, self::$chevy], 'Alice is the most recent Person in the store, and cars are Ford and Chevrolet'],
81
-            'Related Nth Noun'           => ["Person's 1st car",     self::$ford,                 'Alice is the most recent Person in the store, and her 1st car is the Ford'],
82
-            'Nth Nouns Related Noun'     => ["1st Person's car",     [self::$kia, self::$toyota], 'Bob is the 1st Person in the store, and his cars are Kia and Toyota'],
83
-            'Nth Nouns Related Nth Noun' => ["1st Person's 1st car", self::$kia,                  'Bob is the 1st Person in the store, and his 1st car is the Kia'],
84
-            'Missing Noun'               => ['Dog',                  null,                        'Dog does not exist in the store'],
85
-            'Missing Nth Noun'           => ['3rd Person',           null,                        '3rd Person does not exist in the store'],
86
-            'Missing Related Noun'       => ["Person's dog",         null,                        'Alice is the most recent Person in the store, but has no dog'],
78
+            'Noun'                       => ['Person', self::$alice, 'Alice is the most recent Person in the store'],
79
+            'Nth Noun'                   => ['1st Person', self::$bob, 'Bob is the 1st Person in the store'],
80
+            'Related Noun'               => ["Person's car", [self::$ford, self::$chevy], 'Alice is the most recent Person in the store, and cars are Ford and Chevrolet'],
81
+            'Related Nth Noun'           => ["Person's 1st car", self::$ford, 'Alice is the most recent Person in the store, and her 1st car is the Ford'],
82
+            'Nth Nouns Related Noun'     => ["1st Person's car", [self::$kia, self::$toyota], 'Bob is the 1st Person in the store, and his cars are Kia and Toyota'],
83
+            'Nth Nouns Related Nth Noun' => ["1st Person's 1st car", self::$kia, 'Bob is the 1st Person in the store, and his 1st car is the Kia'],
84
+            'Missing Noun'               => ['Dog', null, 'Dog does not exist in the store'],
85
+            'Missing Nth Noun'           => ['3rd Person', null, '3rd Person does not exist in the store'],
86
+            'Missing Related Noun'       => ["Person's dog", null, 'Alice is the most recent Person in the store, but has no dog'],
87 87
         ];
88 88
     }
89 89
 
Please login to merge, or discard this patch.
test/Unit/Chekote/Phake/Expectation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
      * @param  array                      $args   the args that are expected to be passed to the method.
67 67
      * @return AnswerBinderProxy|StubberProxy
68 68
      */
69
-    public function __call($method, array $args): AnswerBinderProxy|StubberProxy
69
+    public function __call($method, array $args): AnswerBinderProxy | StubberProxy
70 70
     {
71 71
         // record the method and args for verification later
72 72
         $this->method = $method;
Please login to merge, or discard this patch.