Passed
Pull Request — master (#3)
by Ronan
07:33
created
src/File.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     static public function join(...$pieces)
20 20
     {
21 21
         $separator = DIRECTORY_SEPARATOR;
22
-        $prefix    = ($separator == substr($pieces[0],0,1)) ? $separator : '';
22
+        $prefix    = ($separator == substr($pieces[0], 0, 1)) ? $separator : '';
23 23
         foreach ($pieces as &$piece) {
24 24
             $piece = trim($piece, $separator);
25 25
         }
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
         if (!mkdir($dest, $mode, true)) {
54 54
             return false;
55 55
         }
56
-        while(false !== ( $file = readdir($dir)) ) {
56
+        while (false !== ($file = readdir($dir))) {
57 57
             if (($file == '.') || ($file == '..')) {
58 58
                 continue;
59 59
             }
60
-            if (is_dir($source . '/' . $file) ) {
60
+            if (is_dir($source . '/' . $file)) {
61 61
                 if (!static::cp($source . '/' . $file, $dest . '/' . $file)) {
62 62
                     return false;
63 63
                 }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         if (!$dir = opendir($path)) {
96 96
             return false;
97 97
         }
98
-        while(false !== ( $file = readdir($dir)) ) {
98
+        while (false !== ($file = readdir($dir))) {
99 99
             if (($file == '.') || ($file == '..')) {
100 100
                 continue;
101 101
             }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                 if (!unlink($thisPath)) {
105 105
                     return false;
106 106
                 }
107
-            } else if (is_dir($thisPath) ) {
107
+            } else if (is_dir($thisPath)) {
108 108
                 if (!static::rm($thisPath)) {
109 109
                     return false;
110 110
                 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
                 if (!static::cp($source . '/' . $file, $dest . '/' . $file)) {
62 62
                     return false;
63 63
                 }
64
-            }
65
-            else {
64
+            } else {
66 65
                 if (!copy($source . '/' . $file, $dest . '/' . $file)) {
67 66
                     return false;
68 67
                 }
@@ -108,8 +107,7 @@  discard block
 block discarded – undo
108 107
                 if (!static::rm($thisPath)) {
109 108
                     return false;
110 109
                 }
111
-            }
112
-            else {
110
+            } else {
113 111
                 if (!unlink($thisPath)) {
114 112
                     return false;
115 113
                 }
Please login to merge, or discard this patch.
src/Str.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
         // [2.0]
96 96
         if ('f' == mb_substr($string, -1) || 'fe' == mb_substr($string, -2)) {
97
-            $length = ('e' == mb_substr($string, -1)) ? -2 : -1 ;
97
+            $length = ('e' == mb_substr($string, -1)) ? -2 : -1;
98 98
             return mb_substr($string, 0, $length) . 'ves';
99 99
         }
100 100
 
@@ -325,8 +325,8 @@  discard block
 block discarded – undo
325 325
      */
326 326
     static public function moustaches(string $template, array $params)
327 327
     {
328
-        $keys = array_map(function ($value) {
329
-            return '{'.$value.'}';
328
+        $keys = array_map(function($value) {
329
+            return '{' . $value . '}';
330 330
         }, array_keys($params));
331 331
         $values = array_values($params);
332 332
 
Please login to merge, or discard this patch.