@@ -17,27 +17,27 @@ discard block |
||
17 | 17 | |
18 | 18 | $value = str_shuffle(uniqid('pfc', true)); |
19 | 19 | |
20 | -if(!$Psr16Adapter->has('test-key')){ |
|
20 | +if (!$Psr16Adapter->has('test-key')) { |
|
21 | 21 | $testHelper->printPassText('1/6 Psr16 hasser returned expected boolean (false)'); |
22 | -}else{ |
|
22 | +} else { |
|
23 | 23 | $testHelper->printFailText('1/6 Psr16 hasser returned unexpected boolean (true)'); |
24 | 24 | } |
25 | 25 | |
26 | 26 | $testHelper->printNewLine()->printText('Setting up value to "test-key"...')->printNewLine(); |
27 | 27 | $Psr16Adapter->set('test-key', $value); |
28 | 28 | |
29 | -if($Psr16Adapter->get('test-key') === $value){ |
|
29 | +if ($Psr16Adapter->get('test-key') === $value) { |
|
30 | 30 | $testHelper->printPassText('2/6 Psr16 getter returned expected value: ' . $value); |
31 | -}else{ |
|
31 | +} else { |
|
32 | 32 | $testHelper->printFailText('2/6 Psr16 getter returned unexpected value: ' . $value); |
33 | 33 | } |
34 | 34 | |
35 | 35 | $testHelper->printNewLine()->printText('Deleting key "test-key"...')->printNewLine(); |
36 | 36 | $Psr16Adapter->delete('test-key', $value); |
37 | 37 | |
38 | -if(!$Psr16Adapter->has('test-key')){ |
|
38 | +if (!$Psr16Adapter->has('test-key')) { |
|
39 | 39 | $testHelper->printPassText('3/6 Psr16 hasser returned expected boolean (false)'); |
40 | -}else{ |
|
40 | +} else { |
|
41 | 41 | $testHelper->printFailText('3/6 Psr16 hasser returned unexpected boolean (true)'); |
42 | 42 | } |
43 | 43 | |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | |
51 | 51 | |
52 | 52 | $values = $Psr16Adapter->getMultiple(['test-key', 'test-key2', 'test-key3']); |
53 | -if(count(array_filter($values)) === 3){ |
|
53 | +if (count(array_filter($values)) === 3) { |
|
54 | 54 | $testHelper->printPassText('4/6 Psr16 multiple getters returned expected values (3)'); |
55 | -}else{ |
|
55 | +} else { |
|
56 | 56 | $testHelper->printFailText('4/6 Psr16 getters(3) returned unexpected values.'); |
57 | 57 | } |
58 | 58 | |
@@ -66,18 +66,18 @@ discard block |
||
66 | 66 | 'test-key3' => $value |
67 | 67 | ]); |
68 | 68 | |
69 | -if($Psr16Adapter->has('test-key') && $Psr16Adapter->has('test-key2') && $Psr16Adapter->has('test-key3')){ |
|
69 | +if ($Psr16Adapter->has('test-key') && $Psr16Adapter->has('test-key2') && $Psr16Adapter->has('test-key3')) { |
|
70 | 70 | $testHelper->printPassText('5/6 Psr16 hasser returned expected booleans (true)'); |
71 | -}else{ |
|
71 | +} else { |
|
72 | 72 | $testHelper->printFailText('5/6 Psr16 hasser returned one or more unexpected boolean (false)'); |
73 | 73 | } |
74 | 74 | |
75 | 75 | $testHelper->printNewLine()->printText('Deleting up keys "test-key, test-key2, test-key3"...')->printNewLine(); |
76 | 76 | $Psr16Adapter->deleteMultiple(['test-key', 'test-key2', 'test-key3']); |
77 | 77 | |
78 | -if(!$Psr16Adapter->has('test-key') && !$Psr16Adapter->has('test-key2') && !$Psr16Adapter->has('test-key3')){ |
|
78 | +if (!$Psr16Adapter->has('test-key') && !$Psr16Adapter->has('test-key2') && !$Psr16Adapter->has('test-key3')) { |
|
79 | 79 | $testHelper->printPassText('6/6 Psr16 hasser returned expected booleans (false)'); |
80 | -}else{ |
|
80 | +} else { |
|
81 | 81 | $testHelper->printFailText('6/6 Psr16 hasser returned one or more unexpected boolean (true)'); |
82 | 82 | } |
83 | 83 |
@@ -110,7 +110,7 @@ |
||
110 | 110 | public function getMultiple($keys, $default = null) |
111 | 111 | { |
112 | 112 | try { |
113 | - return array_map(function (ExtendedCacheItemInterface $item) { |
|
113 | + return array_map(function(ExtendedCacheItemInterface $item) { |
|
114 | 114 | return $item->get(); |
115 | 115 | }, $this->internalCacheInstance->getItems($keys)); |
116 | 116 | } catch (phpFastCacheInvalidArgumentException $e) { |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Register Autoload |
20 | 20 | */ |
21 | -spl_autoload_register(function ($entity) { |
|
21 | +spl_autoload_register(function($entity) { |
|
22 | 22 | $module = explode('\\', $entity, 2); |
23 | - if (!in_array($module[ 0 ], ['phpFastCache', 'Psr'])) { |
|
23 | + if (!in_array($module[0], ['phpFastCache', 'Psr'])) { |
|
24 | 24 | /** |
25 | 25 | * Not a part of phpFastCache file |
26 | 26 | * then we return here. |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | if (is_readable($path)) { |
33 | 33 | require_once $path; |
34 | - }else{ |
|
34 | + } else { |
|
35 | 35 | trigger_error('Cannot locate the Psr/Cache files', E_USER_ERROR); |
36 | 36 | } |
37 | 37 | return; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | if (is_readable($path)) { |
42 | 42 | require_once $path; |
43 | - }else{ |
|
43 | + } else { |
|
44 | 44 | trigger_error('Cannot locate the Psr/SimpleCache files', E_USER_ERROR); |
45 | 45 | } |
46 | 46 | return; |