@@ -15,7 +15,7 @@ |
||
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 | ); |
@@ -25,15 +25,15 @@ |
||
25 | 25 | { |
26 | 26 | return [ |
27 | 27 | // key index parsedKey, parsedIndex |
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 |
@@ -37,10 +37,10 @@ |
||
37 | 37 | { |
38 | 38 | return [ |
39 | 39 | // key, index, expectedResult |
40 | - [ 'No such key', null, false ], // missing key |
|
41 | - [ StoreTest::KEY, 2, false ], // missing index |
|
42 | - [ StoreTest::KEY, null, true ], // present key |
|
43 | - [ StoreTest::KEY, 1, true ], // present index |
|
40 | + ['No such key', null, false], // missing key |
|
41 | + [StoreTest::KEY, 2, false], // missing index |
|
42 | + [StoreTest::KEY, null, true], // present key |
|
43 | + [StoreTest::KEY, 1, true], // present index |
|
44 | 44 | ]; |
45 | 45 | } |
46 | 46 |
@@ -54,8 +54,8 @@ |
||
54 | 54 | { |
55 | 55 | return [ |
56 | 56 | // storedValue, checkedValue, expectedResult |
57 | - [ 'This is a value', 'is a', true ], |
|
58 | - [ 'This is a value', 'words', false ], |
|
57 | + ['This is a value', 'is a', true], |
|
58 | + ['This is a value', 'words', false], |
|
59 | 59 | ]; |
60 | 60 | } |
61 | 61 |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | public function successScenariosDataProvider() |
20 | 20 | { |
21 | 21 | return [ |
22 | - [0, 'th'], [1, 'st'], [2, 'nd'], [3, 'rd'], |
|
23 | - [4, 'th'], [5, 'th'], [6, 'th'], [7, 'th'], |
|
24 | - [8, 'th'], [9, 'th'], [10, 'th'], [11, 'th'], |
|
25 | - [12, 'th'], [13, 'th'], [14, 'th'], [21, 'st'], |
|
26 | - [22, 'nd'], [23, 'rd'], [24, 'th'], [101, 'st'], |
|
22 | + [0, 'th'], [1, 'st'], [2, 'nd'], [3, 'rd'], |
|
23 | + [4, 'th'], [5, 'th'], [6, 'th'], [7, 'th'], |
|
24 | + [8, 'th'], [9, 'th'], [10, 'th'], [11, 'th'], |
|
25 | + [12, 'th'], [13, 'th'], [14, 'th'], [21, 'st'], |
|
26 | + [22, 'nd'], [23, 'rd'], [24, 'th'], [101, 'st'], |
|
27 | 27 | [102, 'nd'], [103, 'rd'], [104, 'th'], |
28 | 28 | ]; |
29 | 29 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | { |
33 | 33 | return [ |
34 | 34 | // nth exception class exception message |
35 | - [-1, InvalidArgumentException::class, '$nth must be a positive number'], |
|
35 | + [-1, InvalidArgumentException::class, '$nth must be a positive number'], |
|
36 | 36 | ]; |
37 | 37 | } |
38 | 38 |
@@ -107,6 +107,6 @@ |
||
107 | 107 | * @return bool |
108 | 108 | */ |
109 | 109 | protected function isPossessive($key) { |
110 | - return strpos($key, self::POSSESSION) !== false; |
|
110 | + return strpos($key, self::POSSESSION) !== false; |
|
111 | 111 | } |
112 | 112 | } |
@@ -7,59 +7,59 @@ |
||
7 | 7 | */ |
8 | 8 | class IsPossessiveTest extends KeyTest |
9 | 9 | { |
10 | - public function setUp() |
|
11 | - { |
|
10 | + public function setUp() |
|
11 | + { |
|
12 | 12 | parent::setUp(); |
13 | 13 | |
14 | 14 | /* @noinspection PhpUndefinedMethodInspection */ |
15 | 15 | Phake::when($this->key)->isPossessive(Phake::anyParameters())->thenCallParent(); |
16 | - } |
|
16 | + } |
|
17 | 17 | |
18 | - /** |
|
19 | - * @dataProvider possessiveNouns |
|
20 | - */ |
|
21 | - public function testReturnsTrueForPossessiveNoun($noun) { |
|
18 | + /** |
|
19 | + * @dataProvider possessiveNouns |
|
20 | + */ |
|
21 | + public function testReturnsTrueForPossessiveNoun($noun) { |
|
22 | 22 | /* @noinspection PhpUndefinedMethodInspection */ |
23 | 23 | $this->assertTrue( |
24 | 24 | Phake::makeVisible($this->key)->isPossessive($noun), |
25 | 25 | "'$noun' should be considered a possessive noun" |
26 | 26 | ); |
27 | - } |
|
27 | + } |
|
28 | 28 | |
29 | - /** |
|
30 | - * Data provider of possessive nouns |
|
31 | - * |
|
32 | - * @return string[] |
|
33 | - */ |
|
34 | - public function possessiveNouns() { |
|
29 | + /** |
|
30 | + * Data provider of possessive nouns |
|
31 | + * |
|
32 | + * @return string[] |
|
33 | + */ |
|
34 | + public function possessiveNouns() { |
|
35 | 35 | return [ |
36 | 36 | ["Customer's Car"], |
37 | 37 | ["8th Customer's Car"], |
38 | 38 | ["Customer's 2nd Car"], |
39 | 39 | ["7th Customer's 4th Car"], |
40 | 40 | ]; |
41 | - } |
|
41 | + } |
|
42 | 42 | |
43 | - /** |
|
44 | - * @dataProvider nonPossessiveNouns |
|
45 | - */ |
|
46 | - public function testReturnsFalseForNonPossessiveNoun($noun) { |
|
43 | + /** |
|
44 | + * @dataProvider nonPossessiveNouns |
|
45 | + */ |
|
46 | + public function testReturnsFalseForNonPossessiveNoun($noun) { |
|
47 | 47 | /* @noinspection PhpUndefinedMethodInspection */ |
48 | 48 | $this->assertFalse( |
49 | 49 | Phake::makeVisible($this->key)->isPossessive($noun), |
50 | 50 | "'$noun' should not be considered a possessive noun" |
51 | 51 | ); |
52 | - } |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * Data provider of non possessive nouns |
|
56 | - * |
|
57 | - * @return string[] |
|
58 | - */ |
|
59 | - public function nonPossessiveNouns() { |
|
54 | + /** |
|
55 | + * Data provider of non possessive nouns |
|
56 | + * |
|
57 | + * @return string[] |
|
58 | + */ |
|
59 | + public function nonPossessiveNouns() { |
|
60 | 60 | return [ |
61 | 61 | ['Item'], |
62 | 62 | ['1st Item'], |
63 | 63 | ]; |
64 | - } |
|
64 | + } |
|
65 | 65 | } |