@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | public function __construct($directory, $extension = '', $umask = 0002) |
68 | 68 | { |
69 | 69 | // YES, this needs to be *before* createPathIfNeeded() |
70 | - if (! is_int($umask)) { |
|
70 | + if ( ! is_int($umask)) { |
|
71 | 71 | throw new \InvalidArgumentException(sprintf( |
72 | 72 | 'The umask parameter is required to be integer, was: %s', |
73 | 73 | gettype($umask) |
@@ -75,14 +75,14 @@ discard block |
||
75 | 75 | } |
76 | 76 | $this->umask = $umask; |
77 | 77 | |
78 | - if (! $this->createPathIfNeeded($directory)) { |
|
78 | + if ( ! $this->createPathIfNeeded($directory)) { |
|
79 | 79 | throw new \InvalidArgumentException(sprintf( |
80 | 80 | 'The directory "%s" does not exist and could not be created.', |
81 | 81 | $directory |
82 | 82 | )); |
83 | 83 | } |
84 | 84 | |
85 | - if (! is_writable($directory)) { |
|
85 | + if ( ! is_writable($directory)) { |
|
86 | 86 | throw new \InvalidArgumentException(sprintf( |
87 | 87 | 'The directory "%s" is not writable.', |
88 | 88 | $directory |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | // And there is a bug in PHP (https://bugs.php.net/bug.php?id=70943) with path lengths of 259. |
138 | 138 | // So if the id in hex representation would surpass the limit, we use the hash instead. The prefix prevents |
139 | 139 | // collisions between the hash and bin2hex. |
140 | - $filename = '_' . $hash; |
|
140 | + $filename = '_'.$hash; |
|
141 | 141 | } else { |
142 | 142 | $filename = bin2hex($id); |
143 | 143 | } |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | private function createPathIfNeeded(string $path) : bool |
215 | 215 | { |
216 | - if (! is_dir($path)) { |
|
216 | + if ( ! is_dir($path)) { |
|
217 | 217 | if (@mkdir($path, 0777 & (~$this->umask), true) === false && ! is_dir($path)) { |
218 | 218 | return false; |
219 | 219 | } |
@@ -234,11 +234,11 @@ discard block |
||
234 | 234 | { |
235 | 235 | $filepath = pathinfo($filename, PATHINFO_DIRNAME); |
236 | 236 | |
237 | - if (! $this->createPathIfNeeded($filepath)) { |
|
237 | + if ( ! $this->createPathIfNeeded($filepath)) { |
|
238 | 238 | return false; |
239 | 239 | } |
240 | 240 | |
241 | - if (! is_writable($filepath)) { |
|
241 | + if ( ! is_writable($filepath)) { |
|
242 | 242 | return false; |
243 | 243 | } |
244 | 244 |
@@ -77,7 +77,7 @@ |
||
77 | 77 | // no internal array function supports this sort of mapping: needs to be iterative |
78 | 78 | // this filters and combines keys in one pass |
79 | 79 | foreach ($namespacedKeys as $requestedKey => $namespacedKey) { |
80 | - if (! isset($items[$namespacedKey]) && ! array_key_exists($namespacedKey, $items)) { |
|
80 | + if ( ! isset($items[$namespacedKey]) && ! array_key_exists($namespacedKey, $items)) { |
|
81 | 81 | continue; |
82 | 82 | } |
83 | 83 |