@@ -16,12 +16,12 @@ |
||
16 | 16 | } |
17 | 17 | |
18 | 18 | $className = self::MODULE_NAMESPACE.$systemPrefix.'\\'.$className; |
19 | - if ( ! class_exists($className)) { |
|
19 | + if (!class_exists($className)) { |
|
20 | 20 | throw new ApiException('Invalid module given'); |
21 | 21 | } |
22 | 22 | |
23 | 23 | $reflectionClass = new \ReflectionClass($className); |
24 | - if ( ! $reflectionClass->isSubclassOf(self::MODULE_NAMESPACE.'ModuleInterface')) { |
|
24 | + if (!$reflectionClass->isSubclassOf(self::MODULE_NAMESPACE.'ModuleInterface')) { |
|
25 | 25 | throw new ApiException('Not valid implementation of Module'); |
26 | 26 | } |
27 | 27 |
@@ -43,13 +43,13 @@ |
||
43 | 43 | */ |
44 | 44 | private function invokeController($controllerName, $method, array $parameters) |
45 | 45 | { |
46 | - if ( ! $this->controllerFactory) { |
|
46 | + if (!$this->controllerFactory) { |
|
47 | 47 | throw new \Exception('Controller Factory invalid.'); |
48 | 48 | } |
49 | 49 | |
50 | 50 | $controller = $this->controllerFactory->build($controllerName); |
51 | 51 | |
52 | - if ( ! method_exists($controller, $method)) { |
|
52 | + if (!method_exists($controller, $method)) { |
|
53 | 53 | throw new \Exception("Method called '{$method}' not found in '{$controllerName}'."); |
54 | 54 | } |
55 | 55 | call_user_func_array([$controller, $method], $parameters); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | break; |
24 | 24 | } |
25 | 25 | |
26 | - if ( ! class_exists($className)) { |
|
26 | + if (!class_exists($className)) { |
|
27 | 27 | throw new \Exception("Strategy {$className} not found"); |
28 | 28 | } |
29 | 29 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | break; |
24 | 24 | } |
25 | 25 | |
26 | - if ( ! class_exists($className)) { |
|
26 | + if (!class_exists($className)) { |
|
27 | 27 | throw new \Exception("Strategy {$className} not found"); |
28 | 28 | } |
29 | 29 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | is_null($pingHostname) ? $config->hostToPing = $config->defaultHostToPing : $config->hostToPing = $pingHostname; |
19 | 19 | $this->addModules($container->get('ModuleFacade'), $config); |
20 | 20 | $renderData = $container->get('ModuleFacade')->returnModulesData(); |
21 | - if ( ! $this->canUserPassWhiteList($ip, $config)) { |
|
21 | + if (!$this->canUserPassWhiteList($ip, $config)) { |
|
22 | 22 | $renderData = ['error' => 'Your ip is not on whitelist.']; |
23 | 23 | } |
24 | 24 | $response = $this->renderFormat( |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | private function canUserPassWhiteList($clientIp, Config $config) |
34 | 34 | { |
35 | 35 | if ($config->whitelistEnabled) { |
36 | - if ( ! in_array($clientIp, $config->whitelist)) { |
|
36 | + if (!in_array($clientIp, $config->whitelist)) { |
|
37 | 37 | return false; |
38 | 38 | } |
39 | 39 | } |