Passed
Pull Request — master (#16)
by Donald
02:41
created
test/Chekote/NounStore/Key/ParseTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,15 +25,15 @@
 block discarded – undo
25 25
     {
26 26
         return [
27 27
         //   key           index   parse parseIndex
28
-            ['Thing',       null, 'Thing',     null], // no nth in key or index param
29
-            ['1st Thing',   null, 'Thing',        0], // 1st in key with no index param
30
-            ['1st Thing',      0, 'Thing',        0], // nth in key with matching index param
31
-            ['2nd Thing',   null, 'Thing',        1], // 2nd in key with no index param
32
-            ['3rd Thing',   null, 'Thing',        2], // 3rd in key with no index param
33
-            ['4th Thing',   null, 'Thing',        3], // 3th in key with no index param
34
-            ['478th Thing', null, 'Thing',      477], // high nth in key with no index param
35
-            ['Thing',          0, 'Thing',        0], // no nth in key with 0 index param
36
-            ['Thing',         49, 'Thing',       49], // no nth in key with high index param
28
+            ['Thing', null, 'Thing', null], // no nth in key or index param
29
+            ['1st Thing', null, 'Thing', 0], // 1st in key with no index param
30
+            ['1st Thing', 0, 'Thing', 0], // nth in key with matching index param
31
+            ['2nd Thing', null, 'Thing', 1], // 2nd in key with no index param
32
+            ['3rd Thing', null, 'Thing', 2], // 3rd in key with no index param
33
+            ['4th Thing', null, 'Thing', 3], // 3th in key with no index param
34
+            ['478th Thing', null, 'Thing', 477], // high nth in key with no index param
35
+            ['Thing', 0, 'Thing', 0], // no nth in key with 0 index param
36
+            ['Thing', 49, 'Thing', 49], // no nth in key with high index param
37 37
         ];
38 38
     }
39 39
 
Please login to merge, or discard this patch.
test/Chekote/NounStore/Key/GetOrdinalTest.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -20,25 +20,25 @@  discard block
 block discarded – undo
20 20
     {
21 21
         return [
22 22
         //   nth  expected
23
-            [0,   'th'],
24
-            [1,   'st'],
25
-            [2,   'nd'],
26
-            [3,   'rd'],
27
-            [4,   'th'],
28
-            [5,   'th'],
29
-            [6,   'th'],
30
-            [7,   'th'],
31
-            [8,   'th'],
32
-            [9,   'th'],
33
-            [10,  'th'],
34
-            [11,  'th'],
35
-            [12,  'th'],
36
-            [13,  'th'],
37
-            [14,  'th'],
38
-            [21,  'st'],
39
-            [22,  'nd'],
40
-            [23,  'rd'],
41
-            [24,  'th'],
23
+            [0, 'th'],
24
+            [1, 'st'],
25
+            [2, 'nd'],
26
+            [3, 'rd'],
27
+            [4, 'th'],
28
+            [5, 'th'],
29
+            [6, 'th'],
30
+            [7, 'th'],
31
+            [8, 'th'],
32
+            [9, 'th'],
33
+            [10, 'th'],
34
+            [11, 'th'],
35
+            [12, 'th'],
36
+            [13, 'th'],
37
+            [14, 'th'],
38
+            [21, 'st'],
39
+            [22, 'nd'],
40
+            [23, 'rd'],
41
+            [24, 'th'],
42 42
             [101, 'st'],
43 43
             [102, 'nd'],
44 44
             [103, 'rd'],
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         return [
52 52
         //   nth  exception class                  exception message
53
-            [-1,  InvalidArgumentException::class, '$nth must be a positive number'],
53
+            [-1, InvalidArgumentException::class, '$nth must be a positive number'],
54 54
         ];
55 55
     }
56 56
 
Please login to merge, or discard this patch.
test/Chekote/NounStore/Store/KeyValueContainsTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
     {
21 21
         return [
22 22
         //  key                  index, parsedKey, parsedIndex, storedValue,             checkedValue
23
-            ['1st ' . self::KEY,  null, self::KEY,           0, self::FIRST_VALUE,       substr(self::FIRST_VALUE, 0, 2)       ], // key with nth
24
-            ['2nd ' . self::KEY,  null, self::KEY,           1, self::SECOND_VALUE,      substr(self::SECOND_VALUE, 0, 2)      ], // key with nth
25
-            [self::KEY,           null, self::KEY,        null, self::MOST_RECENT_VALUE, substr(self::MOST_RECENT_VALUE, 0, 2) ], // key without nth
26
-            [self::KEY,              0, self::KEY,           0, self::FIRST_VALUE,       substr(self::FIRST_VALUE, 0, 2)       ], // with index
27
-            [self::KEY,              1, self::KEY,           1, self::SECOND_VALUE,      substr(self::SECOND_VALUE, 0, 2)      ], // with index
23
+            ['1st ' . self::KEY, null, self::KEY, 0, self::FIRST_VALUE, substr(self::FIRST_VALUE, 0, 2)], // key with nth
24
+            ['2nd ' . self::KEY, null, self::KEY, 1, self::SECOND_VALUE, substr(self::SECOND_VALUE, 0, 2)], // key with nth
25
+            [self::KEY, null, self::KEY, null, self::MOST_RECENT_VALUE, substr(self::MOST_RECENT_VALUE, 0, 2)], // key without nth
26
+            [self::KEY, 0, self::KEY, 0, self::FIRST_VALUE, substr(self::FIRST_VALUE, 0, 2)], // with index
27
+            [self::KEY, 1, self::KEY, 1, self::SECOND_VALUE, substr(self::SECOND_VALUE, 0, 2)], // with index
28 28
         ];
29 29
     }
30 30
 
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
     {
33 33
         return [
34 34
         //  key,                 index, parsedKey,     parsedIndex, storedValue,        checkedValue
35
-            ['1st ' . self::KEY,  null, self::KEY,               0, self::FIRST_VALUE,  self::SECOND_VALUE ], // value mismatch
36
-            ['2nd ' . self::KEY,  null, self::KEY,               1, self::SECOND_VALUE, self::FIRST_VALUE  ], // value mismatch
37
-            ['3rd ' . self::KEY,  null, self::KEY,               2, null,               null               ], // no such nth
38
-            ['No Such Key',       null, 'No Such Key',        null, null,               null               ], // no such key
35
+            ['1st ' . self::KEY, null, self::KEY, 0, self::FIRST_VALUE, self::SECOND_VALUE], // value mismatch
36
+            ['2nd ' . self::KEY, null, self::KEY, 1, self::SECOND_VALUE, self::FIRST_VALUE], // value mismatch
37
+            ['3rd ' . self::KEY, null, self::KEY, 2, null, null], // no such nth
38
+            ['No Such Key', null, 'No Such Key', null, null, null], // no such key
39 39
         ];
40 40
     }
41 41
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         return [
45 45
         //  key                  value index exception class                  exception message
46
-            ['1st ' . self::KEY, null,    1, InvalidArgumentException::class, "1 was provided for index param when key '1st " . self::KEY . "' contains an nth value, but they do not match"],
46
+            ['1st ' . self::KEY, null, 1, InvalidArgumentException::class, "1 was provided for index param when key '1st " . self::KEY . "' contains an nth value, but they do not match"],
47 47
         ];
48 48
     }
49 49
 
Please login to merge, or discard this patch.
test/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/Chekote/NounStore/Assert/KeyExistsTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         /** @noinspection PhpUndefinedMethodInspection */
51 51
         Phake::when($this->key)->parse($key, $index)->thenThrow($exception);
52 52
 
53
-        $this->assertException($exception, function () use ($key, $index) {
53
+        $this->assertException($exception, function() use ($key, $index) {
54 54
             $this->assert->keyExists($key, $index);
55 55
         });
56 56
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             Phake::when($this->key)->build($parsedKey, $parsedIndex)->thenReturn($key);
74 74
         }
75 75
 
76
-        $this->assertException($exception, function () use ($key, $index) {
76
+        $this->assertException($exception, function() use ($key, $index) {
77 77
             $this->assert->keyExists($key, $index);
78 78
         });
79 79
 
Please login to merge, or discard this patch.
test/Chekote/NounStore/Assert/KeyValueContainsTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         /** @noinspection PhpUndefinedMethodInspection */
54 54
         Phake::when($this->key)->parse($key, $index)->thenThrow($exception);
55 55
 
56
-        $this->assertException($exception, function () use ($key, $value, $index) {
56
+        $this->assertException($exception, function() use ($key, $value, $index) {
57 57
             $this->assert->keyValueContains($key, $value, $index);
58 58
         });
59 59
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             Phake::when($this->assert)->keyExists($parsedKey, $parsedIndex)->thenThrow($exception);
76 76
         }
77 77
 
78
-        $this->assertException($exception, function () use ($key, $value, $index) {
78
+        $this->assertException($exception, function() use ($key, $value, $index) {
79 79
             $this->assert->keyValueContains($key, $value, $index);
80 80
         });
81 81
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             Phake::when($this->key)->build($parsedKey, $parsedIndex)->thenReturn($key);
103 103
         }
104 104
 
105
-        $this->assertException($exception, function () use ($key, $value, $index) {
105
+        $this->assertException($exception, function() use ($key, $value, $index) {
106 106
             $this->assert->keyValueContains($key, $value, $index);
107 107
         });
108 108
 
Please login to merge, or discard this patch.
test/Chekote/NounStore/Assert/KeyValueIsTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         /** @noinspection PhpUndefinedMethodInspection */
56 56
         Phake::when($this->key)->parse($key, $index)->thenThrow($exception);
57 57
 
58
-        $this->assertException($exception, function () use ($key, $value, $index) {
58
+        $this->assertException($exception, function() use ($key, $value, $index) {
59 59
             $this->assert->keyValueIs($key, $value, $index);
60 60
         });
61 61
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             Phake::when($this->assert)->keyExists($parsedKey, $parsedIndex)->thenThrow($exception);
79 79
         }
80 80
 
81
-        $this->assertException($exception, function () use ($key, $value, $index) {
81
+        $this->assertException($exception, function() use ($key, $value, $index) {
82 82
             $this->assert->keyValueIs($key, $value, $index);
83 83
         });
84 84
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             Phake::when($this->key)->build($parsedKey, $parsedIndex)->thenReturn($key);
107 107
         }
108 108
 
109
-        $this->assertException($exception, function () use ($key, $value, $index) {
109
+        $this->assertException($exception, function() use ($key, $value, $index) {
110 110
             $this->assert->keyValueIs($key, $value, $index);
111 111
         });
112 112
 
Please login to merge, or discard this patch.
test/Chekote/NounStore/Key/BuildTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         /** @noinspection PhpUndefinedMethodInspection */
50 50
         Phake::when($this->key)->getOrdinal($nth)->thenThrow($exception);
51 51
 
52
-        $this->assertException($exception, function () use ($key, $index) {
52
+        $this->assertException($exception, function() use ($key, $index) {
53 53
             $this->key->build($key, $index);
54 54
         });
55 55
 
Please login to merge, or discard this patch.