Completed
Push — master ( 3d1281...7469ec )
by Ma
06:45
created
src/Api/Format/Xml.php 1 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/Route/Router.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     
26 26
     private function prepareRouteInfo($routeInfo)
27 27
     {
28
-        isset($routeInfo[1]['method']) || $routeInfo[1]['method']  = null;
28
+        isset($routeInfo[1]['method']) || $routeInfo[1]['method'] = null;
29 29
         isset($routeInfo[1]['controller']) || $routeInfo[1]['controller'] = null;
30 30
         isset($routeInfo[2]) || $routeInfo[2] = [];
31 31
         isset($routeInfo[2]['format']) || $routeInfo[2]['format'] = 'json';
Please login to merge, or discard this patch.
src/public/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 require_once  __DIR__.("/../../vendor/autoload.php");
6 6
 
7 7
 $dispatcher = FastRoute\simpleDispatcher(
8
-    function (FastRoute\RouteCollector $r) {
8
+    function(FastRoute\RouteCollector $r) {
9 9
         $r->addRoute(
10 10
             'GET',
11 11
             '/serverinfo/{format}[/{pingHostname:[[:alnum:].]+}]',
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
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         if (json_last_error() !== JSON_ERROR_NONE) {
46 46
             throw new \Exception('Can\'t parse config');
47 47
         }
48
-        return (array) $decodedData;
48
+        return (array)$decodedData;
49 49
     }
50 50
 
51 51
     /**
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     private function isFileReadable($fullPath)
56 56
     {
57
-        if ( ! is_readable($fullPath)) {
57
+        if (!is_readable($fullPath)) {
58 58
             throw new \Exception('config is not readable');
59 59
         }
60 60
     }
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/Module/Abstr/Memcached.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         if (func_num_args() != 2) {
17 17
             throw new \InvalidArgumentException('Bad number of arguments');
18 18
         }
19
-        if ( ! class_exists('\Memcached')) {
19
+        if (!class_exists('\Memcached')) {
20 20
             throw new ModuleException('Can\'t find Memcached class');
21 21
         }
22 22
         
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     public function returnData()
31 31
     {
32 32
         $memcachedStats = $this->memcached->getstats();
33
-        $statsArr = $memcachedStats[$this->ip . ":" . $this->port];
33
+        $statsArr = $memcachedStats[$this->ip.":".$this->port];
34 34
         return array(
35 35
             'memcache_get'       => $statsArr['cmd_get'],
36 36
             'memcache_hits'      => $statsArr['get_hits'],
Please login to merge, or discard this patch.
src/Api/Module/Abstr/Mysql.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     private function connect($hostname, $user, $password)
23 23
     {
24 24
         mysqli_report(MYSQLI_REPORT_STRICT);
25
-        if ( ! class_exists('\mysqli')) {
25
+        if (!class_exists('\mysqli')) {
26 26
             throw new ModuleException('Mysqli class not found');
27 27
         }
28 28
         try {
Please login to merge, or discard this patch.
src/Api/Module/Abstr/System.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     protected function getPing($server_host, $port = 80, $timeout = 1)
38 38
     {
39 39
         $pingMs = 0;
40
-        if ( ! function_exists('fSockOpen')) {
40
+        if (!function_exists('fSockOpen')) {
41 41
             return 0;
42 42
         }
43 43
         $pingStart = microtime(true);
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     protected function getHostname()
54 54
     {
55
-        if ( ! function_exists("gethostname")) {
55
+        if (!function_exists("gethostname")) {
56 56
             $ip = $_SERVER['SERVER_ADDR'];
57 57
             return gethostbyaddr($ip);
58 58
         }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     protected function getDiskTotal()
64 64
     {
65
-        if ( ! function_exists('disk_total_space')) {
65
+        if (!function_exists('disk_total_space')) {
66 66
             return 0;
67 67
         }
68 68
         return (float)disk_total_space("/");
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
     protected function getDiskFree()
72 72
     {
73
-        if ( ! function_exists('disk_free_space')) {
73
+        if (!function_exists('disk_free_space')) {
74 74
             return 0;
75 75
         }
76 76
         return (float)disk_free_space("/");
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     protected function getAvgLoad()
80 80
     {
81
-        if ( ! function_exists('sys_getloadavg')) {
81
+        if (!function_exists('sys_getloadavg')) {
82 82
             return 0;
83 83
         }
84 84
         
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     protected function getMemory()
90 90
     {
91 91
         $meminfoFile = file_get_contents('/proc/meminfo', false);
92
-        if ( ! (bool)$meminfoFile) {
92
+        if (!(bool)$meminfoFile) {
93 93
             return 0;
94 94
         }
95 95
 
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
 
113 113
     protected function getCores()
114 114
     {
115
-        if ( ! is_readable('/proc/stat')) {
115
+        if (!is_readable('/proc/stat')) {
116 116
             return 0;
117 117
         }
118 118
         
119 119
         $coreFile = file_get_contents('/proc/stat', false);
120
-        if ( ! $coreFile) {
120
+        if (!$coreFile) {
121 121
             return 0;
122 122
         }
123 123
 
Please login to merge, or discard this patch.