@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | public function __construct($directory, $extension = '', $umask = 0002) |
73 | 73 | { |
74 | 74 | // YES, this needs to be *before* createPathIfNeeded() |
75 | - if (! is_int($umask)) { |
|
75 | + if ( ! is_int($umask)) { |
|
76 | 76 | throw new InvalidArgumentException(sprintf( |
77 | 77 | 'The umask parameter is required to be integer, was: %s', |
78 | 78 | gettype($umask) |
@@ -80,14 +80,14 @@ discard block |
||
80 | 80 | } |
81 | 81 | $this->umask = $umask; |
82 | 82 | |
83 | - if (! $this->createPathIfNeeded($directory)) { |
|
83 | + if ( ! $this->createPathIfNeeded($directory)) { |
|
84 | 84 | throw new InvalidArgumentException(sprintf( |
85 | 85 | 'The directory "%s" does not exist and could not be created.', |
86 | 86 | $directory |
87 | 87 | )); |
88 | 88 | } |
89 | 89 | |
90 | - if (! is_writable($directory)) { |
|
90 | + if ( ! is_writable($directory)) { |
|
91 | 91 | throw new InvalidArgumentException(sprintf( |
92 | 92 | 'The directory "%s" is not writable.', |
93 | 93 | $directory |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | // And there is a bug in PHP (https://bugs.php.net/bug.php?id=70943) with path lengths of 259. |
143 | 143 | // So if the id in hex representation would surpass the limit, we use the hash instead. The prefix prevents |
144 | 144 | // collisions between the hash and bin2hex. |
145 | - $filename = '_' . $hash; |
|
145 | + $filename = '_'.$hash; |
|
146 | 146 | } else { |
147 | 147 | $filename = bin2hex($id); |
148 | 148 | } |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | */ |
219 | 219 | private function createPathIfNeeded(string $path) : bool |
220 | 220 | { |
221 | - if (! is_dir($path)) { |
|
221 | + if ( ! is_dir($path)) { |
|
222 | 222 | if (@mkdir($path, 0777 & (~$this->umask), true) === false && ! is_dir($path)) { |
223 | 223 | return false; |
224 | 224 | } |
@@ -239,11 +239,11 @@ discard block |
||
239 | 239 | { |
240 | 240 | $filepath = pathinfo($filename, PATHINFO_DIRNAME); |
241 | 241 | |
242 | - if (! $this->createPathIfNeeded($filepath)) { |
|
242 | + if ( ! $this->createPathIfNeeded($filepath)) { |
|
243 | 243 | return false; |
244 | 244 | } |
245 | 245 | |
246 | - if (! is_writable($filepath)) { |
|
246 | + if ( ! is_writable($filepath)) { |
|
247 | 247 | return false; |
248 | 248 | } |
249 | 249 |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | { |
76 | 76 | $item = $this->findById($id); |
77 | 77 | |
78 | - if (! $item) { |
|
78 | + if ( ! $item) { |
|
79 | 79 | return false; |
80 | 80 | } |
81 | 81 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | { |
154 | 154 | [$idField] = $fields = $this->getFields(); |
155 | 155 | |
156 | - if (! $includeData) { |
|
156 | + if ( ! $includeData) { |
|
157 | 157 | $key = array_search(static::DATA_FIELD, $fields); |
158 | 158 | unset($fields[$key]); |
159 | 159 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | { |
33 | 33 | parent::__construct($directory, $extension, $umask); |
34 | 34 | |
35 | - self::$emptyErrorHandler = static function () { |
|
35 | + self::$emptyErrorHandler = static function() { |
|
36 | 36 | }; |
37 | 37 | } |
38 | 38 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | restore_error_handler(); |
111 | 111 | |
112 | - if (! isset($value['lifetime'])) { |
|
112 | + if ( ! isset($value['lifetime'])) { |
|
113 | 113 | return null; |
114 | 114 | } |
115 | 115 |
@@ -69,7 +69,7 @@ |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | // No lifetime, use MSET |
72 | - $response = $this->client->mset(array_map(static function ($value) { |
|
72 | + $response = $this->client->mset(array_map(static function($value) { |
|
73 | 73 | return serialize($value); |
74 | 74 | }, $keysAndValues)); |
75 | 75 |