Passed
Push — master ( f37e0e...2cab5f )
by Oleg
03:49
created
cli/Threads.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     protected function createIPCSegment()
91 91
     {
92
-        $this->fileIPC1 = '/tmp/' . mt_rand() . md5($this->getName()) . '.shm';
92
+        $this->fileIPC1 = '/tmp/'.mt_rand().md5($this->getName()).'.shm';
93 93
 
94 94
         touch($this->fileIPC1);
95 95
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      */
142 142
     protected function createIPCSemaphore()
143 143
     {
144
-        $this->fileIPC2 = '/tmp/' . mt_rand() . md5($this->getName()) . '.sem';
144
+        $this->fileIPC2 = '/tmp/'.mt_rand().md5($this->getName()).'.sem';
145 145
 
146 146
         touch($this->fileIPC2);
147 147
 
@@ -217,8 +217,8 @@  discard block
 block discarded – undo
217 217
 
218 218
         if ($shm_bytes_written !== strlen($serialized_IPC_array)) {
219 219
             throw new Exception(
220
-                'Fatal exception writing SHM segment (shmop_write)' . strlen($serialized_IPC_array) .
221
-                '-' . shmop_size($this->internalIPCKey)
220
+                'Fatal exception writing SHM segment (shmop_write)'.strlen($serialized_IPC_array).
221
+                '-'.shmop_size($this->internalIPCKey)
222 222
             );
223 223
         }
224 224
     }
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         $serialized_IPC_array = shmop_read($this->internalIPCKey, 0, shmop_size($this->internalIPCKey));
270 270
 
271 271
         if (!$serialized_IPC_array) {
272
-            throw new Exception('Fatal exception reading SHM segment (shmop_read)' . "\n");
272
+            throw new Exception('Fatal exception reading SHM segment (shmop_read)'."\n");
273 273
         }
274 274
 
275 275
         unset($this->internalIPCArray);
Please login to merge, or discard this patch.
cli/Console.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@
 block discarded – undo
49 49
      */
50 50
     public function action($name)
51 51
     {
52
-        $command = '\\App\\Consoles\\' . ucfirst($name) . 'ConsoleCommand';
53
-        $command = class_exists($command) ? $command : '\\Micro\\Cli\\Consoles\\' . ucfirst($name) . 'ConsoleCommand';
52
+        $command = '\\App\\Consoles\\'.ucfirst($name).'ConsoleCommand';
53
+        $command = class_exists($command) ? $command : '\\Micro\\Cli\\Consoles\\'.ucfirst($name).'ConsoleCommand';
54 54
 
55 55
         if (!class_exists($command)) {
56 56
             return false;
Please login to merge, or discard this patch.
db/DbConnection.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             );
50 50
         } catch (\PDOException $e) {
51 51
             if (!array_key_exists('ignoreFail', $config) || !$config['ignoreFail']) {
52
-                throw new Exception('Connect to DB failed: ' . $e->getMessage());
52
+                throw new Exception('Connect to DB failed: '.$e->getMessage());
53 53
             }
54 54
         }
55 55
     }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     public function createTable($name, array $elements = [], $params = '')
148 148
     {
149 149
         return $this->conn->exec(
150
-            "CREATE TABLE IF NOT EXISTS `{$name}` (" . implode(',', $elements) . ") {$params};"
150
+            "CREATE TABLE IF NOT EXISTS `{$name}` (".implode(',', $elements).") {$params};"
151 151
         );
152 152
     }
153 153
 
@@ -230,8 +230,8 @@  discard block
 block discarded – undo
230 230
      */
231 231
     public function insert($table, array $line = [], $multi = false)
232 232
     {
233
-        $fields = '`' . implode('`, `', array_keys($multi ? $line[0] : $line)) . '`';
234
-        $values = ':' . implode(', :', array_keys($multi ? $line[0] : $line));
233
+        $fields = '`'.implode('`, `', array_keys($multi ? $line[0] : $line)).'`';
234
+        $values = ':'.implode(', :', array_keys($multi ? $line[0] : $line));
235 235
 
236 236
         $id = null;
237 237
         $dbh = null;
@@ -266,12 +266,12 @@  discard block
 block discarded – undo
266 266
 
267 267
         $valStr = [];
268 268
         foreach ($keys as $key) {
269
-            $valStr[] = '`' . $key . '` = :' . $key;
269
+            $valStr[] = '`'.$key.'` = :'.$key;
270 270
         }
271 271
         $valStr = implode(',', $valStr);
272 272
 
273 273
         if ($conditions) {
274
-            $conditions = 'WHERE ' . $conditions;
274
+            $conditions = 'WHERE '.$conditions;
275 275
         }
276 276
 
277 277
         return $this->conn->prepare(
@@ -296,11 +296,11 @@  discard block
 block discarded – undo
296 296
     {
297 297
         $keys = [];
298 298
         foreach ($params AS $key => $val) {
299
-            $keys[] = '`' . $table . '`.`' . $key . '`="' . $val . '"';
299
+            $keys[] = '`'.$table.'`.`'.$key.'`="'.$val.'"';
300 300
         }
301 301
 
302 302
         $sth = $this->conn->prepare(
303
-            'SELECT * FROM `' . $table . '` WHERE ' . implode(' AND ', $keys) . ' LIMIT 1;'
303
+            'SELECT * FROM `'.$table.'` WHERE '.implode(' AND ', $keys).' LIMIT 1;'
304 304
         );
305 305
         $sth->execute();
306 306
 
Please login to merge, or discard this patch.
web/Language.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
         $lang = $this->container->lang;
46 46
         $lang = $lang ?: $this->defaultLang;
47 47
 
48
-        if (!file_exists($viewName . $lang . '.ini')) {
48
+        if (!file_exists($viewName.$lang.'.ini')) {
49 49
             return;
50 50
         }
51 51
 
52
-        $this->language = parse_ini_file($viewName . $lang . '.ini', true);
52
+        $this->language = parse_ini_file($viewName.$lang.'.ini', true);
53 53
     }
54 54
 
55 55
     /**
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         if (!empty($this->language[$name])) {
68 68
             return $this->language[$name];
69 69
         } else {
70
-            throw new Exception($name . ' not defined into lang file');
70
+            throw new Exception($name.' not defined into lang file');
71 71
         }
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
web/Curl.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     public function get($url, array $data = [])
128 128
     {
129 129
         if (count($data) > 0) {
130
-            $this->setopt(CURLOPT_URL, $url . '?' . http_build_query($data));
130
+            $this->setopt(CURLOPT_URL, $url.'?'.http_build_query($data));
131 131
         } else {
132 132
             $this->setopt(CURLOPT_URL, $url);
133 133
         }
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      */
207 207
     public function put($url, array $data = [])
208 208
     {
209
-        $this->setopt(CURLOPT_URL, $url . '?' . http_build_query($data));
209
+        $this->setopt(CURLOPT_URL, $url.'?'.http_build_query($data));
210 210
         $this->setopt(CURLOPT_CUSTOMREQUEST, 'PUT');
211 211
         $this->_exec();
212 212
     }
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      */
242 242
     public function delete($url, array $data = [])
243 243
     {
244
-        $this->setopt(CURLOPT_URL, $url . '?' . http_build_query($data));
244
+        $this->setopt(CURLOPT_URL, $url.'?'.http_build_query($data));
245 245
         $this->setopt(CURLOPT_CUSTOMREQUEST, 'DELETE');
246 246
         $this->_exec();
247 247
     }
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     public function setBasicAuthentication($username, $password)
260 260
     {
261 261
         $this->setHttpAuth(self::AUTH_BASIC);
262
-        $this->setopt(CURLOPT_USERPWD, $username . ':' . $password);
262
+        $this->setopt(CURLOPT_USERPWD, $username.':'.$password);
263 263
     }
264 264
 
265 265
     /**
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
      */
289 289
     public function setHeader($key, $value)
290 290
     {
291
-        $this->_headers[$key] = $key . ': ' . $value;
291
+        $this->_headers[$key] = $key.': '.$value;
292 292
         $this->setopt(CURLOPT_HTTPHEADER, array_values($this->_headers));
293 293
     }
294 294
 
Please login to merge, or discard this patch.
web/Ftp.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             return true;
151 151
         }
152 152
 
153
-        $this->error = 'Failed to set file permissions for "' . $remote_file . '"';
153
+        $this->error = 'Failed to set file permissions for "'.$remote_file.'"';
154 154
 
155 155
         return false;
156 156
     }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         $this->_stream = $func($this->_host, $this->_port, $this->_timeout);
167 167
 
168 168
         if (!$this->_stream) {
169
-            $this->error = 'Failed to connect ' . $this->_host . '.';
169
+            $this->error = 'Failed to connect '.$this->_host.'.';
170 170
 
171 171
             return false;
172 172
         }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
             return true;
180 180
         }
181 181
 
182
-        $this->error = 'Failed to connect to ' . $this->_host . ' (login failed)';
182
+        $this->error = 'Failed to connect to '.$this->_host.' (login failed)';
183 183
 
184 184
         return false;
185 185
     }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
             return true;
198 198
         }
199 199
 
200
-        $this->error = 'Failed to delete file "' . $remote_file . '"';
200
+        $this->error = 'Failed to delete file "'.$remote_file.'"';
201 201
 
202 202
         return false;
203 203
     }
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             return true;
218 218
         }
219 219
 
220
-        $this->error = 'Failed to download file "' . $remote_file . '"';
220
+        $this->error = 'Failed to download file "'.$remote_file.'"';
221 221
 
222 222
         return false;
223 223
     }
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
             return true;
254 254
         }
255 255
 
256
-        $this->error = 'Failed to create directory "' . $directory . '"';
256
+        $this->error = 'Failed to create directory "'.$directory.'"';
257 257
 
258 258
         return false;
259 259
     }
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
             return true;
274 274
         }
275 275
 
276
-        $this->error = 'Failed to upload file "' . $local_file . '"';
276
+        $this->error = 'Failed to upload file "'.$local_file.'"';
277 277
 
278 278
         return false;
279 279
     }
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
             return true;
303 303
         }
304 304
 
305
-        $this->error = 'Failed to rename file "' . $old_name . '"';
305
+        $this->error = 'Failed to rename file "'.$old_name.'"';
306 306
 
307 307
         return false;
308 308
     }
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
             return true;
321 321
         }
322 322
 
323
-        $this->error = 'Failed to remove directory "' . $directory . '"';
323
+        $this->error = 'Failed to remove directory "'.$directory.'"';
324 324
 
325 325
         return false;
326 326
     }
Please login to merge, or discard this patch.
web/Request.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -123,12 +123,12 @@
 block discarded – undo
123 123
 
124 124
         switch ($required) {
125 125
             case true:
126
-                $char = $char ? $char . ':' : $char;
127
-                $name = $name ? $name . ':' : $name;
126
+                $char = $char ? $char.':' : $char;
127
+                $name = $name ? $name.':' : $name;
128 128
                 break;
129 129
             case false:
130
-                $char = $char ? $char . '::' : $char;
131
-                $name = $name ? $name . '::' : $name;
130
+                $char = $char ? $char.'::' : $char;
131
+                $name = $name ? $name.'::' : $name;
132 132
                 break;
133 133
         }
134 134
 
Please login to merge, or discard this patch.
web/html/HeadTagTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public static function link($name, $url, array $attributes = [])
71 71
     {
72
-        return static::openTag('link', array_merge($attributes, ['href' => $url])) .
73
-            $name .
72
+        return static::openTag('link', array_merge($attributes, ['href' => $url])).
73
+            $name.
74 74
             static::closeTag('link');
75 75
     }
76 76
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public static function scriptFile($file)
118 118
     {
119
-        return static::openTag('script', ['src' => $file, 'type' => 'text/javascript']) . static::closeTag('script');
119
+        return static::openTag('script', ['src' => $file, 'type' => 'text/javascript']).static::closeTag('script');
120 120
     }
121 121
 
122 122
     /**
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public static function css($text, array $attributes = [])
134 134
     {
135
-        return static::openTag('style', array_merge($attributes, ['type' => 'text/css'])) .
136
-            $text .
135
+        return static::openTag('style', array_merge($attributes, ['type' => 'text/css'])).
136
+            $text.
137 137
             static::closeTag('style');
138 138
     }
139 139
 
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
     public static function script($text, array $attributes = [], $type = 'text/javascript')
153 153
     {
154 154
         return static::openTag('script',
155
-            array_merge($attributes, ['type' => $type])) .
156
-            ' /*<![CDATA[*/ ' . $text . ' /*]]>*/ ' .
155
+            array_merge($attributes, ['type' => $type])).
156
+            ' /*<![CDATA[*/ '.$text.' /*]]>*/ '.
157 157
             static::closeTag('script');
158 158
     }
159 159
 
@@ -184,6 +184,6 @@  discard block
 block discarded – undo
184 184
      */
185 185
     public static function title($name)
186 186
     {
187
-        return static::openTag('title') . $name . static::closeTag('title');
187
+        return static::openTag('title').$name.static::closeTag('title');
188 188
     }
189 189
 }
Please login to merge, or discard this patch.
web/html/TagTrait.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $result = '';
34 34
         foreach ($attributes AS $elem => $value) {
35
-            $result .= ' ' . $elem . '="' . $value . '" ';
35
+            $result .= ' '.$elem.'="'.$value.'" ';
36 36
         }
37 37
 
38
-        return '<' . $name . $result . '/>';
38
+        return '<'.$name.$result.'/>';
39 39
     }
40 40
 
41 41
     /**
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $result = '';
55 55
         foreach ($attributes AS $key => $value) {
56
-            $result .= ' ' . $key . '="' . $value . '"';
56
+            $result .= ' '.$key.'="'.$value.'"';
57 57
         }
58 58
 
59
-        return '<' . $name . $result . '>';
59
+        return '<'.$name.$result.'>';
60 60
     }
61 61
 
62 62
     /**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public static function closeTag($name)
73 73
     {
74
-        return '</' . $name . '>';
74
+        return '</'.$name.'>';
75 75
     }
76 76
 
77 77
 
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
      */
111 111
     public static function mailto($name, $email, array $attributes = [])
112 112
     {
113
-        return static::openTag('a', array_merge($attributes, ['href' => 'mailto:' . $email])) .
114
-            $name .
113
+        return static::openTag('a', array_merge($attributes, ['href' => 'mailto:'.$email])).
114
+            $name.
115 115
             static::closeTag('a');
116 116
     }
117 117
 
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public static function href($name, $url, array $attributes = [])
131 131
     {
132
-        return static::openTag('a', array_merge($attributes, ['href' => $url])) .
133
-            $name .
132
+        return static::openTag('a', array_merge($attributes, ['href' => $url])).
133
+            $name.
134 134
             static::closeTag('a');
135 135
     }
136 136
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public static function heading($num, $value = null, array $attributes = [])
150 150
     {
151
-        return static::openTag('h' . $num, $attributes) . $value . static::closeTag('h' . $num);
151
+        return static::openTag('h'.$num, $attributes).$value.static::closeTag('h'.$num);
152 152
     }
153 153
 
154 154
     /**
@@ -172,9 +172,9 @@  discard block
 block discarded – undo
172 172
             $areas .= static::tag('area', $coord);
173 173
         }
174 174
 
175
-        return static::image($alt, $source, array_merge($attributeImg, ['usemap' => $name])) .
176
-        static::openTag('map', ['name' => $name, 'id' => $name]) .
177
-        $areas .
175
+        return static::image($alt, $source, array_merge($attributeImg, ['usemap' => $name])).
176
+        static::openTag('map', ['name' => $name, 'id' => $name]).
177
+        $areas.
178 178
         static::closeTag('map');
179 179
     }
180 180
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             $paramsConverted .= static::tag('param', ['name' => $key, 'value' => $val]);
220 220
         }
221 221
 
222
-        return static::openTag('object', $attributes) . $paramsConverted . static::closeTag('object');
222
+        return static::openTag('object', $attributes).$paramsConverted.static::closeTag('object');
223 223
     }
224 224
 
225 225
     /**
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     {
237 237
         $attributes['source'] = $source;
238 238
 
239
-        return static::openTag('embed', $attributes) . static::closeTag('embed');
239
+        return static::openTag('embed', $attributes).static::closeTag('embed');
240 240
     }
241 241
 
242 242
     /**
@@ -271,6 +271,6 @@  discard block
 block discarded – undo
271 271
             $result .= static::closeTag('li');
272 272
         }
273 273
 
274
-        return static::openTag($parentTag, $attributes) . $result . static::closeTag($parentTag);
274
+        return static::openTag($parentTag, $attributes).$result.static::closeTag($parentTag);
275 275
     }
276 276
 }
Please login to merge, or discard this patch.