Completed
Push — master ( e31cc4...25ec03 )
by Ma
04:15
created
src/Api/Format/Xml.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      * Get Header
26 26
      *
27 27
      * @return string
28
-    */
28
+     */
29 29
     public function getHeader()
30 30
     {
31 31
         return 'Content-Type: application/xml';
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
         foreach ($array as $key => $value) {
37 37
             if (is_numeric($key)) {
38
-                $key = 'item' . $key;
38
+                $key = 'item'.$key;
39 39
             }
40 40
 
41 41
             if (is_array($value)) {
Please login to merge, or discard this patch.
src/Api/Module/Windows/System.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         $process = @popen('wmic cpu get NumberOfCores', 'rb');
32 32
         if (false !== $process) {
33 33
             fgets($process);
34
-            $cores= intval(fgets($process));
34
+            $cores = intval(fgets($process));
35 35
             pclose($process);
36 36
             return $cores;
37 37
         }
Please login to merge, or discard this patch.
src/Api/Format/Json.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      * Get Header
26 26
      *
27 27
      * @return string
28
-    */
28
+     */
29 29
     public function getHeader()
30 30
     {
31 31
         return 'Content-Type: application/xml';
Please login to merge, or discard this patch.
src/Api/Config/ConfigJson.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         if (json_last_error() !== JSON_ERROR_NONE) {
48 48
             throw new \Exception('Can\'t parse config');
49 49
         }
50
-        return (array) $decodedData;
50
+        return (array)$decodedData;
51 51
     }
52 52
 
53 53
     /**
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     private function isFileReadable($fullPath)
58 58
     {
59
-        if (! is_readable($fullPath)) {
59
+        if (!is_readable($fullPath)) {
60 60
             throw new \Exception('config is not readable');
61 61
         }
62 62
     }
Please login to merge, or discard this patch.
src/Api/Format/Factory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 
14 14
     public function createFormat($type)
15 15
     {
16
-        if (! array_key_exists($type, $this->types)
17
-          || ! class_exists($this->types[$type])
16
+        if (!array_key_exists($type, $this->types)
17
+          || !class_exists($this->types[$type])
18 18
         ) {
19 19
             throw new ApiException('Format Type: '.$type.' not found.');
20 20
         }
Please login to merge, or discard this patch.
src/Api/Route/Router.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         unset($attributes['method']);
64 64
         unset($attributes['controller']);
65 65
         $parameters = array_merge(['container' => $this->container], $attributes);
66
-        $route= new RouteFound($controller, $method, $parameters);
66
+        $route = new RouteFound($controller, $method, $parameters);
67 67
         $route->render();
68 68
     }
69 69
 }
Please login to merge, or discard this patch.
src/Api/Route/Strategy/RouteFound.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@
 block discarded – undo
45 45
      */
46 46
     private function invokeController($controllerName, $method, array $parameters)
47 47
     {
48
-        if (! $this->controllerFactory) {
48
+        if (!$this->controllerFactory) {
49 49
             throw new \Exception('Controller Factory invalid.');
50 50
         }
51 51
         
52 52
         $controller = $this->controllerFactory->build($controllerName);
53 53
 
54
-        if (! method_exists($controller, $method)) {
54
+        if (!method_exists($controller, $method)) {
55 55
             throw new \Exception("Method called '{$method}' not found in '{$controllerName}'.");
56 56
         }
57 57
         call_user_func_array([$controller, $method], $parameters);
Please login to merge, or discard this patch.
src/Api/Controller/Factory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     public function build($name)
11 11
     {
12 12
         $className = $this->namespace.$name;
13
-        if (! class_exists($className)) {
13
+        if (!class_exists($className)) {
14 14
             throw new ControllerException($className.' class not found.');
15 15
         }
16 16
         return new $className;
Please login to merge, or discard this patch.
src/Api/Controller/ServerInfo.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.