@@ -33,7 +33,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 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 | } |
@@ -221,9 +221,9 @@ discard block |
||
221 | 221 | if ($reflector->isSubclassOf(self::DTO_INTERFACE)) { |
222 | 222 | foreach ($reflector->getProperties(\ReflectionMethod::IS_PUBLIC) as $property) { |
223 | 223 | $type = $this->extractVarType($property->getDocComment()); |
224 | - if(class_exists($type)) { |
|
224 | + if (class_exists($type)) { |
|
225 | 225 | $properties[$property->getName()] = $this->extractModelFields($type); |
226 | - } else { |
|
226 | + }else { |
|
227 | 227 | $properties[$property->getName()] = $type; |
228 | 228 | } |
229 | 229 | } |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | */ |
243 | 243 | protected function extractReturn($model, $comments = '') |
244 | 244 | { |
245 | - $modelDto = []; |
|
245 | + $modelDto = []; |
|
246 | 246 | preg_match('/\@return\ (.*)\((.*)\)\n/i', $comments, $returnTypes); |
247 | 247 | if (count($returnTypes)) { |
248 | 248 | // Extract principal DTO information |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | } elseif (null !== $reflector && $reflector->isSubclassOf(self::DTO_INTERFACE)) { |
296 | 296 | $payload = $this->extractDtoProperties($namespace); |
297 | 297 | } |
298 | - } catch (\Exception $e) { |
|
298 | + }catch (\Exception $e) { |
|
299 | 299 | Logger::getInstance()->errorLog($e->getMessage()); |
300 | 300 | } |
301 | 301 | |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | if (in_array($methodInfo['method'], ['POST', 'PUT'])) { |
332 | 332 | $methodInfo['payload'] = $this->extractPayload($modelNamespace, $docComments); |
333 | 333 | } |
334 | - } catch (\Exception $e) { |
|
334 | + }catch (\Exception $e) { |
|
335 | 335 | jpre($e->getMessage()); |
336 | 336 | Logger::getInstance()->errorLog($e->getMessage()); |
337 | 337 | } |