Completed
Branch master (35a801)
by Luke
02:43
created
src/File.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     /**
155 155
      * Search the parent directory.
156 156
      *
157
-     * @return array|bool|mixed
157
+     * @return File
158 158
      */
159 159
     public function upOne()
160 160
     {
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
      * @author Luke Watts <[email protected]>
296 296
      * @since  1.0.0
297 297
      *
298
-     * @return mixed
298
+     * @return integer
299 299
      */
300 300
     public function getLimit()
301 301
     {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@
 block discarded – undo
224 224
      */
225 225
     public function has()
226 226
     {
227
-         return isset($this->getFileList()[0]);
227
+            return isset($this->getFileList()[0]);
228 228
     }
229 229
     
230 230
     public function make()
Please login to merge, or discard this patch.
Braces   +24 added lines, -8 removed lines patch added patch discarded remove patch
@@ -201,7 +201,9 @@  discard block
 block discarded – undo
201 201
      */
202 202
     public function get($limit = -1)
203 203
     {
204
-        if ($limit === 0 || $limit < -1) throw new \InvalidArgumentException(sprintf("An integer of %s cannot be passed as a limit to the `get` method. Only -1, 1 or more can be given.", $limit));
204
+        if ($limit === 0 || $limit < -1) {
205
+            throw new \InvalidArgumentException(sprintf("An integer of %s cannot be passed as a limit to the `get` method. Only -1, 1 or more can be given.", $limit));
206
+        }
205 207
         $this->limit = $limit;
206 208
         
207 209
         if (isset($this->getFileList()[0])) {
@@ -234,7 +236,9 @@  discard block
 block discarded – undo
234 236
         // Check if first character is one of the self::$regex_delimiters
235 237
         foreach ($this->regex_delimiters as $delimiter) {
236 238
             $pos = (strpos($this->pattern, $delimiter) === 0) ? $delimiter : false;
237
-            if ($pos !== false) break;
239
+            if ($pos !== false) {
240
+                break;
241
+            }
238 242
         }
239 243
     
240 244
         // If first character is one of the $common_regex_delimiters
@@ -255,10 +259,16 @@  discard block
 block discarded – undo
255 259
             foreach ($this->iterator as $item) {
256 260
                 $filename = $item->getFilename();
257 261
             
258
-                if ($item->isDot()) continue;
259
-                if ($item->isDir()) continue;
262
+                if ($item->isDot()) {
263
+                    continue;
264
+                }
265
+                if ($item->isDir()) {
266
+                    continue;
267
+                }
260 268
             
261
-                if (preg_match($this->pattern, $filename) === 1) $this->file_list[] = new \SplFileInfo($item->getPathname());
269
+                if (preg_match($this->pattern, $filename) === 1) {
270
+                    $this->file_list[] = new \SplFileInfo($item->getPathname());
271
+                }
262 272
             }
263 273
         } else {
264 274
             // Reset the array to avoid duplicate entry issue in version 1.0.0 in recursive methods
@@ -268,10 +278,16 @@  discard block
 block discarded – undo
268 278
             foreach ($this->iterator as $item) {
269 279
                 $filename = $item->getFilename();
270 280
             
271
-                if ($item->isDot()) continue;
272
-                if ($item->isDir()) continue;
281
+                if ($item->isDot()) {
282
+                    continue;
283
+                }
284
+                if ($item->isDir()) {
285
+                    continue;
286
+                }
273 287
             
274
-                if (preg_match('/^' . preg_quote($this->pattern) . '$/', $filename) === 1) $this->file_list[] = new \SplFileInfo($item->getPathname());
288
+                if (preg_match('/^' . preg_quote($this->pattern) . '$/', $filename) === 1) {
289
+                    $this->file_list[] = new \SplFileInfo($item->getPathname());
290
+                }
275 291
             }
276 292
         }
277 293
     }
Please login to merge, or discard this patch.