Completed
Branch master (bf914a)
by Marko
02:04
created
Commons/FilesystemInterface.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -302,5 +302,5 @@
 block discarded – undo
302 302
      * @param array $data_array 
303 303
      * @return bool true on success fase on failure
304 304
      */
305
-    public function createStructure($rootpath,$data_array);
305
+    public function createStructure($rootpath, $data_array);
306 306
 }
Please login to merge, or discard this patch.
Commons/TraitForResponse.inc 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -186,14 +186,14 @@  discard block
 block discarded – undo
186 186
         
187 187
         $this->response->setCode($code);
188 188
         $this->response->setTime();
189
-        $this->response->setMsg($this->{$LEVEL}[$code] . (! empty($append_msg) ? ' - ' . $append_msg : ''));
189
+        $this->response->setMsg($this->{$LEVEL}[$code] . (!empty($append_msg) ? ' - ' . $append_msg : ''));
190 190
         $this->response->setUID($this->getUID());
191 191
         $this->response->setUsername($this->getUsername());
192 192
         $this->response->setContext($context);
193 193
         $this->response->setLevel($LEVEL);
194 194
         
195 195
         $logging = $this->getLogFile();
196
-        if (! empty($logging) && ! empty($to_file))
196
+        if (!empty($logging) && !empty($to_file))
197 197
             $this->logToFile($LEVEL);
198 198
     }
199 199
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $message .= '[msg] ' . $this->getMsg() . ' [/msg]' . "\n";
212 212
         
213 213
         $logging = $this->getLogFile();
214
-        if (empty($logging) || ! is_dir(dirname($logging)))
214
+        if (empty($logging) || !is_dir(dirname($logging)))
215 215
             return false;
216 216
         return file_put_contents($logging, $message, FILE_APPEND);
217 217
     }
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     public function setLogFile($filepath = false)
236 236
     {
237 237
         $logfilepath = $this->makeAbsolute($filepath);
238
-        if (empty($filepath) || ! $this->isWritable(dirname($logfilepath))) {
238
+        if (empty($filepath) || !$this->isWritable(dirname($logfilepath))) {
239 239
             $this->error(400, 'setLogFile');
240 240
             return false;
241 241
         }
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
      */
327 327
     public function getCode()
328 328
     {
329
-        return ! is_object($this->response) ? 0 : $this->response->getCode();
329
+        return !is_object($this->response) ? 0 : $this->response->getCode();
330 330
     }
331 331
 
332 332
     /**
Please login to merge, or discard this patch.
php7/TraitForFileSystem.inc 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
                 ));
59 59
             foreach ($files as $file) {
60 60
                 
61
-                (is_dir("$pathname/$file") ? $this->rm("$pathname/$file", $shred) : (! empty($shred) &&
62
-                     ! $this->isLink($pathname . DIRECTORY_SEPARATOR . $file) ? exec(
61
+                (is_dir("$pathname/$file") ? $this->rm("$pathname/$file", $shred) : (!empty($shred) &&
62
+                     !$this->isLink($pathname . DIRECTORY_SEPARATOR . $file) ? exec(
63 63
                         "shred -fzu $pathname" . DIRECTORY_SEPARATOR . "$file") : $this->rm(
64 64
                         $pathname . DIRECTORY_SEPARATOR . $file, $shred)));
65 65
             }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         } else {
71 71
             $this->info(702, $pathname);
72 72
             $this->response()->setStatus($response);
73
-            (! empty($shred) && ! $this->isLink($pathname) ? exec("shred -fzu $pathname") : unlink($pathname));
73
+            (!empty($shred) && !$this->isLink($pathname) ? exec("shred -fzu $pathname") : unlink($pathname));
74 74
         }
75 75
         return $response;
76 76
     }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function scandir($path = false)
84 84
     {
85
-        return ! empty($path) && is_dir($this->makeAbsolute($path)) ? scandir($this->makeAbsolute($path)) : false;
85
+        return !empty($path) && is_dir($this->makeAbsolute($path)) ? scandir($this->makeAbsolute($path)) : false;
86 86
     }
87 87
 
88 88
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     public function stat($filename = false)
94 94
     {
95
-        return ! empty($filename) && file_exists($this->makeAbsolute($filename)) ? stat(
95
+        return !empty($filename) && file_exists($this->makeAbsolute($filename)) ? stat(
96 96
             $this->makeAbsolute($filename)) : false;
97 97
     }
98 98
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      */
180 180
     public function chgrp($filename = false, $group = false)
181 181
     {
182
-        return ! empty($filename) && $this->exists($this->makeAbsolute($filename)) ? chgrp(
182
+        return !empty($filename) && $this->exists($this->makeAbsolute($filename)) ? chgrp(
183 183
             $this->makeAbsolute($filename), $group) : false;
184 184
     }
185 185
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     public function chmod($filename = false, $mode = false)
192 192
     {
193 193
         $filename = $this->makeAbsolute($filename);
194
-        if (file_exists($filename) && ! empty($mode) && is_int($mode))
194
+        if (file_exists($filename) && !empty($mode) && is_int($mode))
195 195
             return chmod($filename, octdec(str_pad($mode, 4, 0, STR_PAD_LEFT)));
196 196
         else
197 197
             return false;
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     public function chown($filename = false, $user = false)
206 206
     {
207 207
         $filename = $this->makeAbsolute($filename);
208
-        if (file_exists($filename) && ! empty($user))
208
+        if (file_exists($filename) && !empty($user))
209 209
             return chown($filename, $user);
210 210
         else
211 211
             return false;
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      */
219 219
     public function clearstatcache($clear_realpath_cache = false, $filename = false)
220 220
     {
221
-        if (! empty($filename) && ! empty($clear_realpath_cache))
221
+        if (!empty($filename) && !empty($clear_realpath_cache))
222 222
             clearstatcache($clear_realpath_cache, $this->makeAbsolute($filename));
223 223
         else
224 224
             clearstatcache();
@@ -234,13 +234,13 @@  discard block
 block discarded – undo
234 234
         $source = $this->makeAbsolute($source);
235 235
         $dest = $this->makeAbsolute($dest);
236 236
         
237
-        if (! empty($source) && ! empty($dest) && ! is_dir($source)) {
237
+        if (!empty($source) && !empty($dest) && !is_dir($source)) {
238 238
             
239 239
             if (empty($context))
240 240
                 return copy($source, $dest);
241 241
             else
242 242
                 return copy($source, $dest, $context);
243
-        } elseif ((! empty($source) && ! empty($dest)) && is_dir($source) && ! file_exists($dest)) {
243
+        } elseif ((!empty($source) && !empty($dest)) && is_dir($source) && !file_exists($dest)) {
244 244
             
245 245
             $tmp_key = basename($source);
246 246
             $tmp_key2 = basename($dest);
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
             $this->close($tmp_key2);
252 252
             
253 253
             foreach ($iterator = new RecursiveIteratorIterator(
254
-                new \RecursiveDirectoryIterator($source, \RecursiveDirectoryIterator::SKIP_DOTS),  // DirectoryTreeObject::CURRENT_AS_FILEINFO
254
+                new \RecursiveDirectoryIterator($source, \RecursiveDirectoryIterator::SKIP_DOTS), // DirectoryTreeObject::CURRENT_AS_FILEINFO
255 255
                 \RecursiveIteratorIterator::SELF_FIRST) as $item) {
256 256
                 if ($item->isDir()) {
257 257
                     if (empty($context)) {
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         $oldname = $this->makeAbsolute($oldname);
290 290
         $newname = $this->makeAbsolute($newname);
291 291
         
292
-        if (! empty($context))
292
+        if (!empty($context))
293 293
             return rename($oldname, $newname, $context);
294 294
         
295 295
         return rename($oldname, $newname);
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
         if (empty($pattern))
306 306
             return false;
307 307
         
308
-        if (! empty($flags))
308
+        if (!empty($flags))
309 309
             return fnmatch($pattern, $string, $flags);
310 310
         else
311 311
             return fnmatch($pattern, $string);
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
             unset($this->dirs[$this->dirkeys[$keyword]]);
365 365
             unset($this->dirkeys[$keyword]);
366 366
             return true;
367
-        } elseif(!empty($keyword) && array_key_exists($keyword,$this->files)) {
367
+        } elseif (!empty($keyword) && array_key_exists($keyword, $this->files)) {
368 368
             $this->files[$keyword] = null;
369 369
             unset($this->files[$keyword]);
370 370
             return true;
@@ -385,8 +385,8 @@  discard block
 block discarded – undo
385 385
         
386 386
         $filename = $this->makeAbsolute($filename);
387 387
         
388
-        $time = ! empty($time) ? $time : time();
389
-        $atime = ! empty($atime) ? $atime : time();
388
+        $time = !empty($time) ? $time : time();
389
+        $atime = !empty($atime) ? $atime : time();
390 390
         
391 391
         return touch($filename, $time, $atime);
392 392
     }
@@ -421,16 +421,16 @@  discard block
 block discarded – undo
421 421
         $absolute_path = $this->makeAbsolute($rootpath);
422 422
         if (empty($skip_debug))
423 423
             $this->debug(810);
424
-        if (empty($rootpath) || ! is_array($data_array) ||
425
-             (! $this->isWritable($absolute_path) && ! $this->isWritable(dirname($absolute_path))))
424
+        if (empty($rootpath) || !is_array($data_array) ||
425
+             (!$this->isWritable($absolute_path) && !$this->isWritable(dirname($absolute_path))))
426 426
             return $this->warning(506) && false;
427 427
         
428
-        if (! $this->isDir($absolute_path))
428
+        if (!$this->isDir($absolute_path))
429 429
             mkdir($absolute_path, 0755, true);
430 430
         
431 431
         foreach ($data_array as $key => $val) {
432 432
             if (is_array($val))
433
-                ! $this->createStructure($absolute_path . DIRECTORY_SEPARATOR . $key, $val, true);
433
+                !$this->createStructure($absolute_path . DIRECTORY_SEPARATOR . $key, $val, true);
434 434
             else
435 435
                 touch($absolute_path . DIRECTORY_SEPARATOR . $val);
436 436
         }
Please login to merge, or discard this patch.
php7/TraitForSharedMethods.inc 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
         else
43 43
             $current_working_directory = $this->makeAbsolute($path);
44 44
         
45
-        if (! empty($validate_dir_name) && (basename($current_working_directory) !== $validate_dir_name))
45
+        if (!empty($validate_dir_name) && (basename($current_working_directory) !== $validate_dir_name))
46 46
             return false;
47 47
         
48
-        if (! is_dir($current_working_directory) || ! is_readable($current_working_directory) ||
49
-             ! chdir($current_working_directory)) {
48
+        if (!is_dir($current_working_directory) || !is_readable($current_working_directory) ||
49
+             !chdir($current_working_directory)) {
50 50
             $this->alert(200, false, $current_working_directory);
51 51
             return false;
52 52
         }
@@ -74,11 +74,11 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function getSize($convert = false, $filename = false)
76 76
     {
77
-        $filename = ! empty($filename) ? $this->makeAbsolute($filename) : false;
77
+        $filename = !empty($filename) ? $this->makeAbsolute($filename) : false;
78 78
         $bytestotal = empty($filename) ? ((method_exists(get_parent_class($this), 'getSize')) ? parent::getSize() : false) : filesize(
79 79
             $filename);
80 80
         
81
-        if (! $this->isDir($filename) && empty($convert))
81
+        if (!$this->isDir($filename) && empty($convert))
82 82
             return $bytestotal;
83 83
         
84 84
         $suffixes = array(
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                 new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS)) as $object) {
102 102
                 $bytestotal += $object->getSize();
103 103
             }
104
-            if (! $convert)
104
+            if (!$convert)
105 105
                 return $bytestotal;
106 106
         }
107 107
         $base = log($bytestotal, 1024);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                 $suffixes[floor($base)]
118 118
             );
119 119
         }
120
-        return ! empty($convert) ? $result : $result[0];
120
+        return !empty($convert) ? $result : $result[0];
121 121
     }
122 122
 
123 123
     /**
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     public function getATime($timeformat = false, $pathname = false)
129 129
     {
130 130
         $atime = empty($pathname) ? parent::getATime() : fileatime($this->makeAbsolute($pathname));
131
-        if (! empty($timeformat) && is_int($atime)) {
131
+        if (!empty($timeformat) && is_int($atime)) {
132 132
             switch ($timeformat) {
133 133
                 case 'ago':
134 134
                     $atime = $this->ct_ago($atime, 'y,m,d,h,i,s', false, true);
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     public function getCTime($timeformat = false, $pathname = false)
153 153
     {
154 154
         $ctime = empty($pathname) ? parent::getCTime() : filectime($this->makeAbsolute($pathname));
155
-        if (! empty($timeformat) && is_int($ctime)) {
155
+        if (!empty($timeformat) && is_int($ctime)) {
156 156
             switch ($timeformat) {
157 157
                 case 'ago':
158 158
                     $ctime = $this->ct_ago($ctime, 'y,m,d,h,i,s', false, true);
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     public function getMTime($timeformat = false, $pathname = false)
177 177
     {
178 178
         $mtime = empty($pathname) ? parent::getMTime() : filemtime($this->makeAbsolute($pathname));
179
-        if (! empty($timeformat) && is_int($mtime)) {
179
+        if (!empty($timeformat) && is_int($mtime)) {
180 180
             switch ($timeformat) {
181 181
                 case 'ago':
182 182
                     $mtime = $this->ct_ago($mtime, 'y,m,d,h,i,s', false, true);
@@ -250,10 +250,10 @@  discard block
 block discarded – undo
250 250
             $fparam = $df . (empty($sfx) ? $locale[$lkey][0] : ' ' .
251 251
                  (($interval->$lkey === 1) ? $locale[$lkey][1] : $locale[$lkey][2]));
252 252
             
253
-            if (! empty($ago_single) && ! empty($dfs))
253
+            if (!empty($ago_single) && !empty($dfs))
254 254
                 break;
255 255
             else
256
-                $dfs = ! empty($dfs) ? $dfs . "%$fparam " : "%$fparam ";
256
+                $dfs = !empty($dfs) ? $dfs . "%$fparam " : "%$fparam ";
257 257
         }
258 258
         if (empty($dfs))
259 259
             $ret = $locale['now'];
@@ -269,10 +269,10 @@  discard block
 block discarded – undo
269 269
      */
270 270
     public function openFile($open_mode = "r", $use_include_path = false, $context = null)
271 271
     {
272
-        if (! method_exists(get_parent_class($this), 'openFile'))
272
+        if (!method_exists(get_parent_class($this), 'openFile'))
273 273
             return false;
274 274
         
275
-        return ! $this->isDir() ? (! empty($context) ? parent::openFile($open_mode, $use_include_path, 
275
+        return !$this->isDir() ? (!empty($context) ? parent::openFile($open_mode, $use_include_path, 
276 276
             $context) : parent::openFile($open_mode, $use_include_path)) : false;
277 277
     }
278 278
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
      */
284 284
     public function setFileClass($class_name = "\HOWI3\libhowi\Filesystem\php7\Objects\FileObject")
285 285
     {
286
-        if (! method_exists(get_parent_class($this), 'setFileClass'))
286
+        if (!method_exists(get_parent_class($this), 'setFileClass'))
287 287
             return false;
288 288
         
289 289
         if (is_subclass_of($class_name, 'SplFileObject') || $class_name === 'SplFileObject') {
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
      */
301 301
     public function setInfoClass($class_name = "\HOWI3\libhowi\Filesystem\php7\Objects\InfoObject")
302 302
     {
303
-        if (! method_exists(get_parent_class($this), 'setInfoClass'))
303
+        if (!method_exists(get_parent_class($this), 'setInfoClass'))
304 304
             return false;
305 305
         
306 306
         if (is_subclass_of($class_name, 'SplFileInfo') || $class_name === 'SplFileInfo') {
@@ -317,9 +317,9 @@  discard block
 block discarded – undo
317 317
      */
318 318
     public function getOwnerName($filename = false)
319 319
     {
320
-        $userID = empty($filename) && method_exists(get_parent_class($this), 'getOwner') ? parent::getOwner() : (! empty(
320
+        $userID = empty($filename) && method_exists(get_parent_class($this), 'getOwner') ? parent::getOwner() : (!empty(
321 321
             $filename) ? fileowner($this->makeAbsolute($filename)) : false);
322
-        $user = ! empty($userID) ? posix_getpwuid($userID) : false;
322
+        $user = !empty($userID) ? posix_getpwuid($userID) : false;
323 323
         return is_array($user) && array_key_exists('name', $user) ? $user['name'] : false;
324 324
     }
325 325
 
@@ -332,8 +332,8 @@  discard block
 block discarded – undo
332 332
     {
333 333
         $groupID = empty($filename) ? ((method_exists(get_parent_class($this), 'getGroup')) ? parent::getGroup() : false) : filegroup(
334 334
             $this->makeAbsolute($filename));
335
-        $group = ! empty($groupID) ? posix_getgrgid($groupID) : false;
336
-        return ! empty($group) && array_key_exists('name', $group) ? $group['name'] : false;
335
+        $group = !empty($groupID) ? posix_getgrgid($groupID) : false;
336
+        return !empty($group) && array_key_exists('name', $group) ? $group['name'] : false;
337 337
     }
338 338
 
339 339
     /**
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
      */
344 344
     public function getRealpath($filename = false)
345 345
     {
346
-        return ! empty($filename) ? realpath($this->makeAbsolute($filename)) : ((method_exists(
346
+        return !empty($filename) ? realpath($this->makeAbsolute($filename)) : ((method_exists(
347 347
             get_parent_class($this), 'getRealpath')) ? parent::getRealpath() : false);
348 348
     }
349 349
 
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
     public function getPathInfo($filename = false, $flags = false, 
356 356
         $class_name = '\HOWI3\libhowi\Filesystem\php7\Objects\InfoObject')
357 357
     {
358
-        return ! empty($filename) ? empty($flags) ? pathinfo($this->makeAbsolute($filename)) : pathinfo(
358
+        return !empty($filename) ? empty($flags) ? pathinfo($this->makeAbsolute($filename)) : pathinfo(
359 359
             $this->makeAbsolute($filename), $flags) : (method_exists(get_parent_class($this), 'getPathInfo') ? parent::getPathInfo(
360 360
             $class_name) : false);
361 361
     }
@@ -421,9 +421,9 @@  discard block
 block discarded – undo
421 421
      */
422 422
     public function getBasename($suffix = false, $pathname = false)
423 423
     {
424
-        $pathname = ! empty($pathname) ? $pathname : ($this->isDot() ? $this->getPath() : false);
425
-        $suffix = ! empty($suffix) ? $suffix : '';
426
-        return ! empty($pathname) || ! method_exists(get_parent_class($this), 'getBasename') ? basename(
424
+        $pathname = !empty($pathname) ? $pathname : ($this->isDot() ? $this->getPath() : false);
425
+        $suffix = !empty($suffix) ? $suffix : '';
426
+        return !empty($pathname) || !method_exists(get_parent_class($this), 'getBasename') ? basename(
427 427
             $pathname, $suffix) : parent::getBasename($suffix);
428 428
     }
429 429
 
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     {
437 437
         $perms = empty($filename) ? ((method_exists(get_parent_class($this), 'getPerms')) ? parent::getPerms() : false) : fileperms(
438 438
             $this->makeAbsolute($filename));
439
-        return ! empty($perms) ? (int) ltrim(substr(sprintf('%o', $perms), - 4), '0') : false;
439
+        return !empty($perms) ? (int) ltrim(substr(sprintf('%o', $perms), - 4), '0') : false;
440 440
     }
441 441
 
442 442
     /**
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
      */
447 447
     public function getType($filename = false)
448 448
     {
449
-        return ! empty($filename) ? filetype($this->makeAbsolute($filename)) : ((method_exists(
449
+        return !empty($filename) ? filetype($this->makeAbsolute($filename)) : ((method_exists(
450 450
             get_parent_class($this), 'getType')) ? parent::getType() : false);
451 451
     }
452 452
 
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
      */
524 524
     public function isExecutable($filename = false)
525 525
     {
526
-        return ! empty($filename) ? is_executable($this->makeAbsolute($filename)) : ((method_exists(
526
+        return !empty($filename) ? is_executable($this->makeAbsolute($filename)) : ((method_exists(
527 527
             get_parent_class($this), 'isExecutable')) ? parent::isExecutable() : false);
528 528
     }
529 529
 
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
      */
535 535
     public function isFile($filename = false)
536 536
     {
537
-        return ! empty($filename) ? is_file($this->makeAbsolute($filename)) : ((method_exists(
537
+        return !empty($filename) ? is_file($this->makeAbsolute($filename)) : ((method_exists(
538 538
             get_parent_class($this), 'isFile')) ? parent::isFile() : false);
539 539
     }
540 540
 
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
      */
546 546
     public function isLink($filename = false)
547 547
     {
548
-        return ! empty($filename) ? is_link($this->makeAbsolute($filename)) : ((method_exists(
548
+        return !empty($filename) ? is_link($this->makeAbsolute($filename)) : ((method_exists(
549 549
             get_parent_class($this), 'isLink')) ? parent::isLink() : false);
550 550
     }
551 551
 
@@ -556,9 +556,9 @@  discard block
 block discarded – undo
556 556
      */
557 557
     public function makeAbsolute($path = false)
558 558
     {
559
-        if (! empty($path) && $this->isAbsolute($path))
559
+        if (!empty($path) && $this->isAbsolute($path))
560 560
             $absolute_path = $path;
561
-        elseif (! empty($path) && $this->isRelative($path)) {
561
+        elseif (!empty($path) && $this->isRelative($path)) {
562 562
             
563 563
             if (preg_match('/^(~\/)/', $path) === 1) {
564 564
                 $absolute_path = getenv("HOME") . substr($path, 1);
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
         
585 585
         $pathname = $this->makeAbsolute($pathname);
586 586
         
587
-        return ! empty($pathname) ? file_exists($pathname) : false;
587
+        return !empty($pathname) ? file_exists($pathname) : false;
588 588
     }
589 589
 
590 590
     /**
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
      */
595 595
     public function getFilename($filename = false)
596 596
     {
597
-        return ! empty($filename) ? basename($this->makeAbsolute($filename)) : ((method_exists(
597
+        return !empty($filename) ? basename($this->makeAbsolute($filename)) : ((method_exists(
598 598
             get_parent_class($this), 'getFilename')) ? parent::getFilename() : false);
599 599
     }
600 600
 
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
      */
606 606
     public function getExtension($filename = false)
607 607
     {
608
-        return ! empty($filename) ? pathinfo($this->makeAbsolute($filename), PATHINFO_EXTENSION) : ((method_exists(
608
+        return !empty($filename) ? pathinfo($this->makeAbsolute($filename), PATHINFO_EXTENSION) : ((method_exists(
609 609
             get_parent_class($this), 'getExtension')) ? parent::getExtension() : false);
610 610
     }
611 611
 }
Please login to merge, or discard this patch.
php7/Objects/DirectoryTreeObject.inc 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function c($basename = false)
49 49
     {
50
-        if (! empty($basename) && array_key_exists($basename, $this->dirkeys))
50
+        if (!empty($basename) && array_key_exists($basename, $this->dirkeys))
51 51
             $c = $this->dirkeys[$basename];
52
-        elseif (! empty($basename) && is_dir($this->getPath() . DIRECTORY_SEPARATOR . $basename)) {
52
+        elseif (!empty($basename) && is_dir($this->getPath() . DIRECTORY_SEPARATOR . $basename)) {
53 53
             $c = new DirectoryTreeObject($this->getPath() . DIRECTORY_SEPARATOR . $basename, 
54 54
                 DirectoryTreeObject::SKIP_DOTS);
55 55
             $c->setFileClass('\HOWI3\libhowi\Filesystem\php7\Objects\FileObject');
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
         $display = [];
94 94
         
95 95
         while ($this->valid()) {
96
-            if (! $this->isDot()) {
97
-                if ($this->isDir() && ! $this->isLink() && ! empty($sort))
96
+            if (!$this->isDot()) {
97
+                if ($this->isDir() && !$this->isLink() && !empty($sort))
98 98
                     $ls['dir'][$this->getFilename()] = $this->getType();
99 99
                 
100
-                elseif ($this->isLink() && ! empty($sort))
100
+                elseif ($this->isLink() && !empty($sort))
101 101
                     $ls['link'][$this->getFilename()] = $this->getType();
102 102
                 
103
-                elseif ($this->isFile() && ! empty($sort))
103
+                elseif ($this->isFile() && !empty($sort))
104 104
                     $ls['file'][$this->getFilename()] = $this->getType();
105 105
                 else
106 106
                     $display[$this->getFilename()] = $this->getType();
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             
113 113
             $this->next();
114 114
         }
115
-        if (! empty($sort)) {
115
+        if (!empty($sort)) {
116 116
             
117 117
             ksort($ls['dir']);
118 118
             ksort($ls['link']);
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         
143 143
         while ($this->valid()) {
144 144
             
145
-            if (! $this->isDot()) {
145
+            if (!$this->isDot()) {
146 146
                 $cname = $this->getFilename();
147 147
                 $lsinfo[$cname] = new \stdClass();
148 148
                 $lsinfo[$cname]->name = $this->getFilename();
@@ -153,20 +153,20 @@  discard block
 block discarded – undo
153 153
                 $lsinfo[$cname]->tchange = $this->getCTime($timeformat);
154 154
                 $lsinfo[$cname]->tmodify = $this->getMTime($timeformat);
155 155
                 
156
-                if ($this->isDir() && ! $this->isLink() && ! empty($sort))
156
+                if ($this->isDir() && !$this->isLink() && !empty($sort))
157 157
                     $ls['dir'][$cname] = $lsinfo[$cname]->type;
158 158
                 
159
-                elseif ($this->isLink() && ! empty($sort))
159
+                elseif ($this->isLink() && !empty($sort))
160 160
                     $ls['link'][$cname] = $lsinfo[$cname]->type;
161 161
                 
162
-                elseif ($this->isFile() && ! empty($sort))
162
+                elseif ($this->isFile() && !empty($sort))
163 163
                     $ls['file'][$cname] = $lsinfo[$cname]->type;
164 164
                 else
165 165
                     $display[$cname] = $lsinfo[$cname]->type;
166 166
             }
167 167
             $this->next();
168 168
         }
169
-        if (! empty($sort)) {
169
+        if (!empty($sort)) {
170 170
             ksort($ls['dir']);
171 171
             ksort($ls['link']);
172 172
             ksort($ls['file']);
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                 $splFileInfo->getFilename()
200 200
             );
201 201
             
202
-            for ($depth = $ritit->getDepth() - 1; $depth >= 0; $depth --) {
202
+            for ($depth = $ritit->getDepth() - 1; $depth >= 0; $depth--) {
203 203
                 $path = array(
204 204
                     $ritit->getSubIterator($depth)
205 205
                         ->current()
Please login to merge, or discard this patch.
php7/Objects/FileObject.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function flock($operation, &$wouldblock = NULL)
50 50
     {
51
-        return ! $wouldblock ? parent::flock($operation) : parent::flock($operation, $wouldblock);
51
+        return !$wouldblock ? parent::flock($operation) : parent::flock($operation, $wouldblock);
52 52
     }
53 53
 
54 54
     /**
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function dummyScale($size)
89 89
     {
90
-        if(!is_int($size) || $this->getSize() > $size) return false;
90
+        if (!is_int($size) || $this->getSize() > $size) return false;
91 91
         
92
-        $this->fseek($size ,SEEK_SET);
92
+        $this->fseek($size, SEEK_SET);
93 93
         $this->fwrite(' ');
94 94
         return true;
95 95
     }
Please login to merge, or discard this patch.
php7/Objects/TmpObject.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function setTmp($path = false)
44 44
     {
45
-        if (! empty($path)) {
45
+        if (!empty($path)) {
46 46
             $tmp = $this->makeAbsolute($path);
47 47
             $isWritable = $this->isWritable($tmp);
48 48
             $this->tmp_path = $isWritable ? $tmp : $this->tmp_path;
49 49
             
50
-            ! empty($isWritable) ? $this->debug(803) : $this->warning(501, $tmp);
50
+            !empty($isWritable) ? $this->debug(803) : $this->warning(501, $tmp);
51 51
             $this->response()->setStatus($isWritable);
52 52
         } else {
53 53
             $this->tmp_path = sys_get_temp_dir();
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     {
101 101
         $this->debug(807);
102 102
         $tmpfie = tmpfile();
103
-        $this->response()->setStatus(! empty($tmpfie) ? true : false);
103
+        $this->response()->setStatus(!empty($tmpfie) ? true : false);
104 104
         return $tmpfie;
105 105
     }
106 106
 }
Please login to merge, or discard this patch.
php7/Objects/DirectoryPlaceholderObject.inc 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -53,23 +53,23 @@  discard block
 block discarded – undo
53 53
     public function __construct($pathname = false, $recursive = true, $mode = false, $context = false, $logfile = false, 
54 54
         $loglevel = false, $UID = false, $username = false)
55 55
     {
56
-        if (! empty($logfile) && file_exists($logfile) && ! empty($loglevel)) {
56
+        if (!empty($logfile) && file_exists($logfile) && !empty($loglevel)) {
57 57
             $this->setLogfile($logfile);
58 58
             $this->setLoglevel($loglevel);
59 59
             $this->setUID($UID);
60 60
             $this->setUsername($username);
61 61
         }
62 62
         
63
-        $pathname = (! empty($pathname) ? $this->makeAbsolute($pathname) : $this->path);
63
+        $pathname = (!empty($pathname) ? $this->makeAbsolute($pathname) : $this->path);
64 64
         
65 65
         $HID = md5($pathname);
66 66
         
67 67
         $this->dirsetPath($pathname, $HID);
68
-        $this->dirsetMode(! empty($mode) ? $mode : $this->mode, $HID);
68
+        $this->dirsetMode(!empty($mode) ? $mode : $this->mode, $HID);
69 69
         
70
-        $this->dirsetRecursive(! empty($recursive) ? true : false, $HID);
70
+        $this->dirsetRecursive(!empty($recursive) ? true : false, $HID);
71 71
         
72
-        $context = ! empty($context) ? $this->dirsetContext($context, $HID) : false;
72
+        $context = !empty($context) ? $this->dirsetContext($context, $HID) : false;
73 73
         
74 74
         $this->info(701, $pathname);
75 75
         $this->response()->setStatus($this->dirCreate($HID));
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function dirsetPath($pathname = false, $HID = false)
84 84
     {
85
-        if (! empty($pathname) && is_string($pathname) && ! empty($HID)) {
85
+        if (!empty($pathname) && is_string($pathname) && !empty($HID)) {
86 86
             
87 87
             $this->path = $this->makeAbsolute($pathname);
88 88
             
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function dirsetMode($mode = false, $HID = false)
102 102
     {
103
-        if (! empty($HID) && ! empty($mode) && is_int($mode)) {
103
+        if (!empty($HID) && !empty($mode) && is_int($mode)) {
104 104
             $this->mode = $mode;
105 105
             return true;
106 106
         } else {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function dirsetRecursive($recursive = false, $HID = false)
119 119
     {
120
-        if (! empty($HID) && is_bool($recursive)) {
120
+        if (!empty($HID) && is_bool($recursive)) {
121 121
             $this->recursive = $recursive;
122 122
             return true;
123 123
         } else {
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function dirsetContext($context = false, $HID = false)
136 136
     {
137
-        if (! empty($HID) && is_resource($context)) {
137
+        if (!empty($HID) && is_resource($context)) {
138 138
             $this->context = $context;
139 139
             return true;
140 140
         } 
@@ -152,16 +152,16 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function dirCreate($HID = false)
154 154
     {
155
-        if ((! is_dir(dirname($this->path)) && $this->recursive === false) ||
156
-             is_dir(dirname($this->path)) && ! $this->isWritable(dirname($this->path))) {
155
+        if ((!is_dir(dirname($this->path)) && $this->recursive === false) ||
156
+             is_dir(dirname($this->path)) && !$this->isWritable(dirname($this->path))) {
157 157
             $this->warning(502, $this->path);
158 158
             $result = false;
159 159
         } else {
160
-            if (! empty($HID) && ! $this->exists($this->path) && ! empty($this->context)) {
160
+            if (!empty($HID) && !$this->exists($this->path) && !empty($this->context)) {
161 161
                 $result = mkdir($this->path, octdec(str_pad($this->mode, 4, 0, STR_PAD_LEFT)), 
162 162
                     $this->recursive, $this->context);
163 163
             }
164
-            if (! empty($HID) && ! $this->exists($this->path) && empty($this->context)) {
164
+            if (!empty($HID) && !$this->exists($this->path) && empty($this->context)) {
165 165
                 
166 166
                 $result = mkdir($this->path, octdec(str_pad($this->mode, 4, 0, STR_PAD_LEFT)), true);
167 167
             }
Please login to merge, or discard this patch.
php7/Objects/LinkObject.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $target = $this->makeAbsolute($target);
45 45
         $link = $this->makeAbsolute($link);
46 46
         
47
-        if (! file_exists($target) || file_exists($link))
47
+        if (!file_exists($target) || file_exists($link))
48 48
             return false;
49 49
         
50 50
         return symlink($target, $link);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $target = $this->makeAbsolute($target);
64 64
         $link = $this->makeAbsolute($link);
65 65
         
66
-        if (! file_exists($target) || is_dir($target) || file_exists($link))
66
+        if (!file_exists($target) || is_dir($target) || file_exists($link))
67 67
             return false;
68 68
         
69 69
         return link($target, $link);
Please login to merge, or discard this patch.