Completed
Push — master ( 5903e5...08322c )
by Marko
22:48 queued 07:53
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   +15 added lines, -15 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
     /**
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
      */
365 365
     public function setStatus($status)
366 366
     {
367
-        if (is_object($this->response))
367
+        if(is_object($this->response))
368 368
             $this->response->setStatus($status);
369 369
     }
370 370
 
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
      */
376 376
     public function setCode($code)
377 377
     {
378
-        if (is_object($this->response))
378
+        if(is_object($this->response))
379 379
             $this->response->setCode($code);
380 380
     }
381 381
 
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
     public function emergency($code = 1, $append_msg = false, $context = false)
390 390
     {
391 391
         $to_file = true;
392
-        if ($this->getLogLevel() < 1)
392
+        if($this->getLogLevel() < 1)
393 393
             $to_file = false;
394 394
         
395 395
         $this->addTrace('EMERGENCY', $code, $context, $append_msg, $to_file);
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
     public function alert($code = 2, $append_msg = false, $context = false)
410 410
     {
411 411
         $to_file = true;
412
-        if ($this->getLogLevel() < 2)
412
+        if($this->getLogLevel() < 2)
413 413
             $to_file = false;
414 414
         $this->addTrace('ALERT', $code, $context, $append_msg, $to_file);
415 415
     }
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
     public function critical($code = 3, $append_msg = false, $context = false)
428 428
     {
429 429
         $to_file = true;
430
-        if ($this->getLogLevel() < 3)
430
+        if($this->getLogLevel() < 3)
431 431
             $to_file = false;
432 432
         $this->addTrace('CRITICAL', $code, $context, $append_msg, $to_file);
433 433
     }
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
     public function error($code = 4, $append_msg = false, $context = false)
446 446
     {
447 447
         $to_file = true;
448
-        if ($this->getLogLevel() < 4)
448
+        if($this->getLogLevel() < 4)
449 449
             $to_file = false;
450 450
         $this->addTrace('ERROR', $code, $context, $append_msg, $to_file);
451 451
     }
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
     public function warning($code = 5, $append_msg = false, $context = false)
465 465
     {
466 466
         $to_file = true;
467
-        if ($this->getLogLevel() < 5)
467
+        if($this->getLogLevel() < 5)
468 468
             $to_file = false;
469 469
         $this->addTrace('WARNING', $code, $context, $append_msg, $to_file);
470 470
     }
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
     public function notice($code = 6, $append_msg = false, $context = false)
482 482
     {
483 483
         $to_file = true;
484
-        if ($this->getLogLevel() < 6)
484
+        if($this->getLogLevel() < 6)
485 485
             $to_file = false;
486 486
         $this->addTrace('NOTICE', $code, $context, $append_msg, $to_file);
487 487
     }
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
     public function info($code = 7, $append_msg = false, $context = false)
501 501
     {
502 502
         $to_file = true;
503
-        if ($this->getLogLevel() < 7)
503
+        if($this->getLogLevel() < 7)
504 504
             $to_file = false;
505 505
         $this->addTrace('INFO', $code, $context, $append_msg, $to_file);
506 506
     }
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
     public function debug($code = 8, $append_msg = false, $context = false)
518 518
     {
519 519
         $to_file = true;
520
-        if ($this->getLogLevel() < 8)
520
+        if($this->getLogLevel() < 8)
521 521
             $to_file = false;
522 522
         $this->addTrace('DEBUG', $code, $context, $append_msg, $to_file);
523 523
     }
Please login to merge, or discard this patch.
FS.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public static function load($ser_cwd_by_caller = false, $PHP_VERSION_ID = PHP_VERSION_ID)
43 43
     {
44
-        if (! empty($ser_cwd_by_caller) && is_bool($ser_cwd_by_caller)) {
44
+        if(!empty($ser_cwd_by_caller) && is_bool($ser_cwd_by_caller)) {
45 45
             $backtrace = debug_backtrace(
46 46
                 defined("DEBUG_BACKTRACE_IGNORE_ARGS") ? DEBUG_BACKTRACE_IGNORE_ARGS : FALSE);
47 47
             $cwd_caller = array_pop($backtrace);
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
         /**
51 51
          * Minimum version of PHP must be atleast 5.5.11
52 52
          */
53
-        if ($PHP_VERSION_ID <= 50511)
53
+        if($PHP_VERSION_ID <= 50511)
54 54
             return call_user_func(
55
-                function () {
55
+                function() {
56 56
                     $self = new self();
57 57
                     $self->emergency(100);
58 58
                     return $self;
Please login to merge, or discard this patch.
bootstrap.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     ), $class);
36 36
     
37 37
     $class_file = LIBHOWI_ROOT . $library . '.inc';
38
-    if (file_exists($class_file))
38
+    if(file_exists($class_file))
39 39
         require_once ($class_file);
40 40
 }
41 41
 spl_autoload_register('libhowi_autoloder');
Please login to merge, or discard this patch.
php5/Objects/FileObject.inc 1 patch
Spacing   +2 added lines, -2 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
     /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     {
90 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.
php5/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.
php5/Objects/TmpObject.inc 1 patch
Spacing   +4 added lines, -4 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();
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function getTmp()
68 68
     {
69
-        if (empty($this->tmp_path))
69
+        if(empty($this->tmp_path))
70 70
             $this->tmp_path = $this->setTmp();
71 71
         
72 72
         $this->debug(805, $this->tmp_path);
@@ -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.
php5/Objects/DirectoryTreeObject.inc 1 patch
Spacing   +18 added lines, -18 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\php5\Objects\FileObject');
@@ -92,27 +92,27 @@  discard block
 block discarded – undo
92 92
         ];
93 93
         $display = [];
94 94
         
95
-        while ($this->valid()) {
96
-            if (! $this->isDot()) {
97
-                if ($this->isDir() && ! $this->isLink() && ! empty($sort))
95
+        while($this->valid()) {
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();
107 107
                 
108
-                if ($this->isDir() || $this->isLink()) {
108
+                if($this->isDir() || $this->isLink()) {
109 109
                     $this->dirkeys[$this->getFilename()] = $this->getChildren();
110 110
                 }
111 111
             }
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']);
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
         $display = [];
141 141
         $lsinfo = [];
142 142
         
143
-        while ($this->valid()) {
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,27 +153,27 @@  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']);
173 173
             
174 174
             $display = array_merge($ls['dir'], $ls['link'], $ls['file']);
175 175
         }
176
-        foreach ($display as $row => $type) {
176
+        foreach($display as $row => $type) {
177 177
             $display[$row] = $lsinfo[$row];
178 178
         }
179 179
         return $display;
@@ -192,14 +192,14 @@  discard block
 block discarded – undo
192 192
         
193 193
         $ritit = new RecursiveIteratorIterator($DirectoryTreeObject, RecursiveIteratorIterator::CHILD_FIRST);
194 194
         $tree = array();
195
-        foreach ($ritit as $splFileInfo) {
195
+        foreach($ritit as $splFileInfo) {
196 196
             $path = $splFileInfo->isDir() ? array(
197 197
                 $splFileInfo->getFilename() => array()
198 198
             ) : array(
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.
php5/Objects/LinkObject.inc 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -38,13 +38,13 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function symlink($target = false, $link = false)
40 40
     {
41
-        if (empty($target) || empty($link))
41
+        if(empty($target) || empty($link))
42 42
             return false;
43 43
         
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);
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function hardlink($target = false, $link = false)
59 59
     {
60
-        if (empty($target) || empty($link))
60
+        if(empty($target) || empty($link))
61 61
             return false;
62 62
         
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);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function lstat($link = false)
78 78
     {
79
-        if (empty($link))
79
+        if(empty($link))
80 80
             return false;
81 81
         $link = $this->makeAbsolute($link);
82 82
         return @lstat($link);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function lstatDiff($link = false)
91 91
     {
92
-        if (empty($link))
92
+        if(empty($link))
93 93
             return false;
94 94
         $link = $this->makeAbsolute($link);
95 95
         return array_diff(stat($link), lstat($link));
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function readlink($link = false)
104 104
     {
105
-        if (empty($link))
105
+        if(empty($link))
106 106
             return false;
107 107
         
108 108
         $link = $this->makeAbsolute($link);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function lchgrp($link = false, $group = false)
118 118
     {
119
-        if (empty($link))
119
+        if(empty($link))
120 120
             return false;
121 121
         
122 122
         $link = $this->makeAbsolute($link);
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      */
131 131
     public function lchown($link = false, $group = false)
132 132
     {
133
-        if (empty($link))
133
+        if(empty($link))
134 134
             return false;
135 135
         
136 136
         $link = $this->makeAbsolute($link);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function linkinfo($link = false)
146 146
     {
147
-        if (empty($link))
147
+        if(empty($link))
148 148
             return false;
149 149
         
150 150
         $link = $this->makeAbsolute($link);
Please login to merge, or discard this patch.