Completed
Push — master ( 487d2a...efc144 )
by Fran
03:53
created
src/services/DocumentorService.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                         if (!preg_match('/^\@ROOT/i', $domain)) {
34 34
                             $modules[] = str_replace('/', '', str_replace('@', '', $domain));
35 35
                         }
36
-                    } catch (\Exception $e) {
36
+                    }catch (\Exception $e) {
37 37
                         $modules[] = $e->getMessage();
38 38
                     }
39 39
                 }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
          */
52 52
         public function extractApiEndpoints($module)
53 53
         {
54
-            $module_path = CORE_DIR . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . "Api";
54
+            $module_path = CORE_DIR.DIRECTORY_SEPARATOR.$module.DIRECTORY_SEPARATOR."Api";
55 55
             $endpoints = [];
56 56
             if (file_exists($module_path)) {
57 57
                 $finder = new Finder();
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                 if (count($finder)) {
60 60
                     /** @var \SplFileInfo $file */
61 61
                     foreach ($finder as $file) {
62
-                        $namespace = "\\{$module}\\Api\\" . str_replace('.php', '', $file->getFilename());
62
+                        $namespace = "\\{$module}\\Api\\".str_replace('.php', '', $file->getFilename());
63 63
                         $endpoints[$namespace] = $this->extractApiInfo($namespace);
64 64
                     }
65 65
                 }
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
                 foreach ($publicMethods as $method) {
86 86
                     try {
87 87
                         $mInfo = $this->extractMethodInfo($namespace, $method, $reflection);
88
-                        if(null !== $mInfo) {
88
+                        if (null !== $mInfo) {
89 89
                             $info[] = $mInfo;
90 90
                         }
91
-                    } catch (\Exception $e) {
91
+                    }catch (\Exception $e) {
92 92
                         Logger::getInstance()->errorLog($e->getMessage());
93 93
                     }
94 94
                 }
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
             if (count($returnTypes)) {
219 219
                 $closure = $modelDto = [];
220 220
                 $isArray = false;
221
-                foreach($returnTypes as $returnType) {
221
+                foreach ($returnTypes as $returnType) {
222 222
                     try {
223 223
                         if (false === strpos($returnType, '@')) {
224 224
                             $class = str_replace('{__API__}', $model, $returnType);
@@ -229,15 +229,15 @@  discard block
 block discarded – undo
229 229
                             if (class_exists($class)) {
230 230
                                 $reflector = new \ReflectionClass($class);
231 231
                                 if ($reflector->isSubclassOf(self::DTO_INTERFACE)) {
232
-                                    foreach($reflector->getProperties(\ReflectionMethod::IS_PUBLIC) as $property) {
232
+                                    foreach ($reflector->getProperties(\ReflectionMethod::IS_PUBLIC) as $property) {
233 233
                                         $closure[$property->getName()] = $this->extractVarType($property->getDocComment());
234 234
                                     }
235
-                                } else {
235
+                                }else {
236 236
                                     $modelDto = $this->extractModelFields($class);
237 237
                                 }
238 238
                             }
239 239
                         }
240
-                    } catch(\Exception $e) {
240
+                    }catch (\Exception $e) {
241 241
                         Logger::getInstance()->errorLog($e->getMessage());
242 242
                     }
243 243
                 }
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                         }
271 271
                     }
272 272
                 }
273
-            } catch(\Exception $e) {
273
+            }catch (\Exception $e) {
274 274
                 Logger::getInstance()->errorLog($e->getMessage());
275 275
             }
276 276
 
Please login to merge, or discard this patch.