Completed
Pull Request — master (#446)
by
unknown
01:42
created
src/functions.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     }
87 87
 
88 88
     if ($node instanceof \PhpParser\Node\Name\FullyQualified) {
89
-        return (string)$node;
89
+        return (string) $node;
90 90
     }
91 91
     if ($node instanceof \PhpParser\Node\Expr\New_) {
92 92
         return getNameOfNode($node->class);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     }
98 98
 
99 99
     if ($node instanceof \PhpParser\Node\Name) {
100
-        return (string)implode($node->parts);
100
+        return (string) implode($node->parts);
101 101
     }
102 102
 
103 103
     if (isset($node->name) && $node->name instanceof \PhpParser\Node\Expr\Variable) {
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
     }
126 126
 
127 127
     if (isset($node->name) && null === $node->name) {
128
-        return 'anonymous@' . spl_object_hash($node);
128
+        return 'anonymous@'.spl_object_hash($node);
129 129
     }
130 130
 
131 131
     if (isset($node->name)) {
132
-        return (string)$node->name;
132
+        return (string) $node->name;
133 133
     }
134 134
 
135 135
     return null;
@@ -147,10 +147,10 @@  discard block
 block discarded – undo
147 147
     }
148 148
     while (false !== ($file = readdir($dir))) {
149 149
         if (($file != '.') && ($file != '..')) {
150
-            if (is_dir($src . '/' . $file)) {
151
-                recurse_copy($src . '/' . $file, $dst . '/' . $file);
150
+            if (is_dir($src.'/'.$file)) {
151
+                recurse_copy($src.'/'.$file, $dst.'/'.$file);
152 152
             } else {
153
-                copy($src . '/' . $file, $dst . '/' . $file);
153
+                copy($src.'/'.$file, $dst.'/'.$file);
154 154
             }
155 155
         }
156 156
     }
@@ -175,16 +175,16 @@  discard block
 block discarded – undo
175 175
 {
176 176
     // memory cache
177 177
     static $caches;
178
-    if(null === $caches) {
178
+    if (null === $caches) {
179 179
         $caches = [];
180 180
     }
181 181
 
182
-    if(!isset($caches[$attribute])) {
182
+    if (!isset($caches[$attribute])) {
183 183
         // avoid to iterate over array too many times
184 184
         $max = 0;
185 185
         $min = 1;
186
-        foreach($array as $item) {
187
-            if(!isset($item[$attribute])) {
186
+        foreach ($array as $item) {
187
+            if (!isset($item[$attribute])) {
188 188
                 continue;
189 189
             }
190 190
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
  *
235 235
  * @return mixed
236 236
  */
237
-function getURIContentAsJson($uri){
237
+function getURIContentAsJson($uri) {
238 238
     // get the json file
239 239
     $httpsProxy = getenv('https_proxy');
240 240
     if (!empty($httpsProxy)) {
Please login to merge, or discard this patch.