Passed
Push — master ( f6e68e...a7b3d9 )
by Fran
03:43
created
src/services/DocumentorService.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
                     if (!preg_match('/^ROOT/i', $module) && $module == $requestModule) {
41 41
                         $modules[] = [
42 42
                             'name' => $module,
43
-                            'path' => realpath($info['template'] . DIRECTORY_SEPARATOR . '..'),
43
+                            'path' => realpath($info['template'].DIRECTORY_SEPARATOR.'..'),
44 44
                         ];
45 45
                     }
46
-                } catch (\Exception $e) {
46
+                }catch (\Exception $e) {
47 47
                     $modules[] = $e->getMessage();
48 48
                 }
49 49
             }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function extractApiEndpoints(array $module)
63 63
     {
64
-        $module_path = $module['path'] . DIRECTORY_SEPARATOR . 'Api';
64
+        $module_path = $module['path'].DIRECTORY_SEPARATOR.'Api';
65 65
         $module_name = $module['name'];
66 66
         $endpoints = [];
67 67
         if (file_exists($module_path)) {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             if (count($finder)) {
71 71
                 /** @var \SplFileInfo $file */
72 72
                 foreach ($finder as $file) {
73
-                    $namespace = "\\{$module_name}\\Api\\" . str_replace('.php', '', $file->getFilename());
73
+                    $namespace = "\\{$module_name}\\Api\\".str_replace('.php', '', $file->getFilename());
74 74
                     $info = $this->extractApiInfo($namespace, $module_name);
75 75
                     if (!empty($info)) {
76 76
                         $endpoints[$namespace] = $info;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                     if (NULL !== $mInfo) {
100 100
                         $info[] = $mInfo;
101 101
                     }
102
-                } catch (\Exception $e) {
102
+                }catch (\Exception $e) {
103 103
                     Logger::getInstance()->errorLog($e->getMessage());
104 104
                 }
105 105
             }
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
             } elseif (null !== $reflector && $reflector->isSubclassOf(self::DTO_INTERFACE)) {
311 311
                 $payload = $this->extractDtoProperties($namespace);
312 312
             }
313
-        } catch (\Exception $e) {
313
+        }catch (\Exception $e) {
314 314
             Logger::getInstance()->errorLog($e->getMessage());
315 315
         }
316 316
 
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
                     if (in_array($methodInfo['method'], ['POST', 'PUT'])) {
348 348
                         $methodInfo['payload'] = $this->extractPayload($modelNamespace, $docComments);
349 349
                     }
350
-                } catch (\Exception $e) {
350
+                }catch (\Exception $e) {
351 351
                     jpre($e->getMessage());
352 352
                     Logger::getInstance()->errorLog($e->getMessage());
353 353
                 }
@@ -426,13 +426,13 @@  discard block
 block discarded – undo
426 426
                         ]]);
427 427
                         if (array_key_exists($subDtoName, $subDto)) {
428 428
                             $definitions = $subDto;
429
-                        } else {
429
+                        }else {
430 430
                             $definitions[$subDtoName] = $subDto;
431 431
                         }
432 432
                         $dto['properties'][$field] = [
433
-                            '$ref' => "#/definitions/" . $subDtoName,
433
+                            '$ref' => "#/definitions/".$subDtoName,
434 434
                         ];
435
-                    } else {
435
+                    }else {
436 436
                         list($type, $format) = self::translateSwaggerFormats($format);
437 437
                         $dto['properties'][$field] = [
438 438
                             "type" => $type,
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
     protected function extractDtoName($dto, $isArray = false)
491 491
     {
492 492
         $dto = explode('\\', $dto);
493
-        $modelDto = array_pop($dto) . "Dto";
493
+        $modelDto = array_pop($dto)."Dto";
494 494
         if ($isArray) {
495 495
             $modelDto .= "List";
496 496
         }
Please login to merge, or discard this patch.
src/controller/DocumentorController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
         $endpoints = [];
35 35
         $module = $this->srv->getModules($domain);
36
-        if(empty($module)) {
36
+        if (empty($module)) {
37 37
             return Router::getInstance()->httpNotFound(null, true);
38 38
         }
39 39
         switch (strtolower($type)) {
Please login to merge, or discard this patch.