Passed
Push — master ( a2249f...9f6c4c )
by Oleg
04:09
created
queue/Queue.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                 break;
68 68
 
69 69
             default:
70
-                throw new Exception('Service type `' . $type . '` wrong name.');
70
+                throw new Exception('Service type `'.$type.'` wrong name.');
71 71
         }
72 72
 
73 73
         return $broker->{$type}($route, $data);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             }
100 100
         }
101 101
         if (!$server) {
102
-            throw new Exception('Message not send, random servers is down into `' . $uri . '`');
102
+            throw new Exception('Message not send, random servers is down into `'.$uri.'`');
103 103
         }
104 104
 
105 105
         return $this->brokers[$server];
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             $servers += $route['*'];
134 134
         }
135 135
         if (!$servers) {
136
-            throw new Exception('Type `' . $type . '` not found into route');
136
+            throw new Exception('Type `'.$type.'` not found into route');
137 137
         }
138 138
 
139 139
         return $servers;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         $keys = array_keys($this->routes);
155 155
 
156 156
         foreach (range(0, count($keys) - 1) AS $i) {
157
-            if (preg_match('/' . $keys[$i] . '/', $uri)) {
157
+            if (preg_match('/'.$keys[$i].'/', $uri)) {
158 158
                 if (!is_array($this->routes[$keys[$i]])) {
159 159
                     $this->routes[$keys[$i]] = ['*' => $this->routes[$keys[$i]]];
160 160
                 }
@@ -162,6 +162,6 @@  discard block
 block discarded – undo
162 162
                 return $this->routes[$keys[$i]];
163 163
             }
164 164
         }
165
-        throw new Exception('Route `' . $uri . '` not found');
165
+        throw new Exception('Route `'.$uri.'` not found');
166 166
     }
167 167
 }
Please login to merge, or discard this patch.
mvc/Module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
         $path = dirname(
34 34
                 str_replace(['\\', 'App'], ['/', $container->kernel->getAppDir()], get_called_class())
35
-            ) . '/config.php';
35
+            ).'/config.php';
36 36
 
37 37
         if (file_exists($path)) {
38 38
             $container->load($path);
Please login to merge, or discard this patch.
mvc/controllers/Controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
         // if module defined
48 48
         if ($modules) {
49
-            $className = '\\App' . $modules . '\\' . ucfirst(basename(str_replace('\\', '/', $modules))) . 'Module';
49
+            $className = '\\App'.$modules.'\\'.ucfirst(basename(str_replace('\\', '/', $modules))).'Module';
50 50
 
51 51
             if (class_exists($className) && is_subclass_of($className, '\Micro\Mvc\Module')) {
52 52
                 $this->module = new $className($this->container);
Please login to merge, or discard this patch.
mvc/controllers/RichController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
         $actionClass = false;
51 51
 
52 52
         // check action exists
53
-        if (!method_exists($this, 'action' . ucfirst($name)) && !$actionClass = $this->getActionClassByName($name)) {
54
-            $this->response->setStatus(500, 'Action "' . $name . '" not found into ' . get_class($this));
53
+        if (!method_exists($this, 'action'.ucfirst($name)) && !$actionClass = $this->getActionClassByName($name)) {
54
+            $this->response->setStatus(500, 'Action "'.$name.'" not found into '.get_class($this));
55 55
 
56 56
             return $this->response;
57 57
         }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
         if (!empty($types[$name]) && $this->methodType !== $types[$name]) {
62 62
             $this->response->setStatus(500,
63
-                'Action "' . $name . '" not run with method "' . $this->methodType . '" into ' . get_class($this)
63
+                'Action "'.$name.'" not run with method "'.$this->methodType.'" into '.get_class($this)
64 64
             );
65 65
 
66 66
             return $this->response;
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             $cl = new $actionClass($this->container);
77 77
             $view = $cl->run();
78 78
         } else {
79
-            $view = $this->{'action' . ucfirst($name)}();
79
+            $view = $this->{'action'.ucfirst($name)}();
80 80
         }
81 81
 
82 82
         if ($this->response->getContentType() !== $this->format) {
Please login to merge, or discard this patch.
mvc/controllers/ViewController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
         $view = null;
41 41
         $actionClass = false;
42 42
 
43
-        if (!method_exists($this, 'action' . ucfirst($name))) {
43
+        if (!method_exists($this, 'action'.ucfirst($name))) {
44 44
             $actionClass = $this->getActionClassByName($name);
45 45
             if (!$actionClass) {
46
-                throw new Exception('Action "' . $name . '" not found into ' . get_class($this));
46
+                throw new Exception('Action "'.$name.'" not found into '.get_class($this));
47 47
             }
48 48
         }
49 49
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             $cl = new $actionClass($this->container);
60 60
             $view = $cl->run();
61 61
         } else {
62
-            $view = $this->{'action' . ucfirst($name)}();
62
+            $view = $this->{'action'.ucfirst($name)}();
63 63
         }
64 64
 
65 65
         if (is_object($view)) {
Please login to merge, or discard this patch.
mvc/views/View.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     public function widget($name, array $options = [], $capture = false)
58 58
     {
59 59
         if (!class_exists($name)) {
60
-            throw new Exception('Widget ' . $name . ' not found.');
60
+            throw new Exception('Widget '.$name.' not found.');
61 61
         }
62 62
 
63 63
         $options = array_merge($options, ['container' => $this->container]);
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
     public function beginWidget($name, array $options = [])
99 99
     {
100 100
         if (!class_exists($name)) {
101
-            throw new Exception('Widget ' . $name . ' not found.');
101
+            throw new Exception('Widget '.$name.' not found.');
102 102
         }
103 103
 
104 104
         if (!empty($GLOBALS['widgetStack'][$name])) {
105
-            throw new Exception('This widget (' . $name . ') already started!');
105
+            throw new Exception('This widget ('.$name.') already started!');
106 106
         }
107 107
 
108 108
         $options = array_merge($options, ['container' => $this->container]);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         }
137 137
 
138 138
         if (!class_exists($name) || empty($GLOBALS['widgetStack'][$name])) {
139
-            throw new Exception('Widget ' . $name . ' not started.');
139
+            throw new Exception('Widget '.$name.' not started.');
140 140
         }
141 141
 
142 142
         /** @var \Micro\mvc\Widget $widget widget */
Please login to merge, or discard this patch.
mvc/views/PhpView.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         if ($this->layout && (!$layoutPath = $this->getLayoutFile($this->container->kernel->getAppDir(),
91 91
                 $this->module))
92 92
         ) {
93
-            $this->container->logger->send('error', 'Layout `' . $this->layout . '` not found');
93
+            $this->container->logger->send('error', 'Layout `'.$this->layout.'` not found');
94 94
         }
95 95
 
96 96
         if ($layoutPath) {
@@ -119,15 +119,15 @@  discard block
 block discarded – undo
119 119
             $module = substr($module, 0, strrpos($module, '/'));
120 120
         }
121 121
 
122
-        $layout = $appDir . '/' . ($module ? $module . '/' : $module);
123
-        $afterPath = 'views/layouts/' . ucfirst($this->layout) . '.php';
122
+        $layout = $appDir.'/'.($module ? $module.'/' : $module);
123
+        $afterPath = 'views/layouts/'.ucfirst($this->layout).'.php';
124 124
 
125
-        if (file_exists($layout . $afterPath)) {
126
-            return $layout . $afterPath;
125
+        if (file_exists($layout.$afterPath)) {
126
+            return $layout.$afterPath;
127 127
         }
128 128
 
129
-        if (file_exists($appDir . '/' . $afterPath)) {
130
-            return $appDir . '/' . $afterPath;
129
+        if (file_exists($appDir.'/'.$afterPath)) {
130
+            return $appDir.'/'.$afterPath;
131 131
         }
132 132
 
133 133
         return false;
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         include str_replace('\\', '/', $fileName);
157 157
 
158 158
         if (!empty($GLOBALS['widgetStack'])) {
159
-            throw new Exception(count($GLOBALS['widgetStack']) . ' widgets not endings.');
159
+            throw new Exception(count($GLOBALS['widgetStack']).' widgets not endings.');
160 160
         }
161 161
 
162 162
         return ob_get_clean();
@@ -187,17 +187,17 @@  discard block
 block discarded – undo
187 187
         $cl = substr($cl, strpos($cl, '/'));
188 188
 
189 189
         if ($this->asWidget) {
190
-            $path .= $cl . '/views/' . $view . '.php';
190
+            $path .= $cl.'/views/'.$view.'.php';
191 191
         } else {
192 192
             $className = str_replace('controller', '',
193
-                strtolower(basename(str_replace('\\', '/', '/' . $this->path))));
194
-            $path .= dirname($cl) . '/views/' . $className . '/' . $view . '.php';
193
+                strtolower(basename(str_replace('\\', '/', '/'.$this->path))));
194
+            $path .= dirname($cl).'/views/'.$className.'/'.$view.'.php';
195 195
         }
196 196
 
197 197
         $path = str_replace('//', '/', $path);
198 198
 
199 199
         if (!file_exists($path)) {
200
-            throw new Exception('View path `' . $path . '` not exists.');
200
+            throw new Exception('View path `'.$path.'` not exists.');
201 201
         }
202 202
 
203 203
         return $path;
Please login to merge, or discard this patch.
mvc/models/Query.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function addSearch($column, $keyword, $escaped = false, $operand = 'AND')
69 69
     {
70
-        $keyword = $escaped ? $keyword : '"%' . $keyword . '%"';
71
-        $this->addWhere($column . ' LIKE ' . $keyword, $operand);
70
+        $keyword = $escaped ? $keyword : '"%'.$keyword.'%"';
71
+        $this->addWhere($column.' LIKE '.$keyword, $operand);
72 72
     }
73 73
 
74 74
     /**
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function addWhere($sql, $operand = 'AND')
78 78
     {
79
-        $this->where .= $this->where ? ' ' . $operand . ' (' . $sql . ')' : ' ' . $this->where . ' (' . $sql . ')';
79
+        $this->where .= $this->where ? ' '.$operand.' ('.$sql.')' : ' '.$this->where.' ('.$sql.')';
80 80
     }
81 81
 
82 82
     /**
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function addNotSearch($column, $keyword, $escaped, $operand = 'AND')
86 86
     {
87
-        $keyword = $escaped ? $keyword : '"%' . $keyword . '%"';
88
-        $this->addWhere($column . ' NOT LIKE ' . $keyword, $operand);
87
+        $keyword = $escaped ? $keyword : '"%'.$keyword.'%"';
88
+        $this->addWhere($column.' NOT LIKE '.$keyword, $operand);
89 89
     }
90 90
 
91 91
     /**
@@ -94,10 +94,10 @@  discard block
 block discarded – undo
94 94
     public function addIn($column, $params, $operand = 'AND')
95 95
     {
96 96
         if (is_array($params)) {
97
-            $params = "'" . implode('\',\'', $params) . '\'';
97
+            $params = "'".implode('\',\'', $params).'\'';
98 98
         }
99 99
 
100
-        $this->addWhere($column . ' IN (' . $params . ')', $operand);
100
+        $this->addWhere($column.' IN ('.$params.')', $operand);
101 101
     }
102 102
 
103 103
     /**
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
     public function addNotIn($column, $params, $operand = 'AND')
107 107
     {
108 108
         if (is_array($params)) {
109
-            $params = "'" . implode('\',\'', $params) . '\'';
109
+            $params = "'".implode('\',\'', $params).'\'';
110 110
         }
111 111
 
112
-        $this->addWhere($column . ' NOT IN (' . $params . ')', $operand);
112
+        $this->addWhere($column.' NOT IN ('.$params.')', $operand);
113 113
     }
114 114
 
115 115
     /**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function addBetween($column, $start, $stop, $operand = 'AND')
119 119
     {
120
-        $this->addWhere($column . ' BETWEEN ' . $start . ' AND ' . $stop, $operand);
120
+        $this->addWhere($column.' BETWEEN '.$start.' AND '.$stop, $operand);
121 121
     }
122 122
 
123 123
     /**
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function addNotBetween($column, $start, $stop, $operand = 'AND')
127 127
     {
128
-        $this->addWhere($column . ' BETWEEN ' . $start . ' AND ' . $stop, $operand);
128
+        $this->addWhere($column.' BETWEEN '.$start.' AND '.$stop, $operand);
129 129
     }
130 130
 
131 131
     /**
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function addJoin($table, $condition, $type = 'LEFT')
135 135
     {
136
-        $this->join .= ' ' . $type . ' JOIN ' . $table . ' ON ' . $condition;
136
+        $this->join .= ' '.$type.' JOIN '.$table.' ON '.$condition;
137 137
     }
138 138
 
139 139
     /**
@@ -156,18 +156,18 @@  discard block
 block discarded – undo
156 156
     {
157 157
         $query = 'SELECT ';
158 158
         $query .= $this->distinct ? 'DISTINCT ' : '';
159
-        $query .= $this->select . ' FROM ' . $this->table;
160
-        $query .= $this->join ? ' ' . $this->join : '';
161
-        $query .= $this->where ? ' WHERE ' . $this->where : '';
162
-        $query .= $this->group ? ' GROUP BY ' . $this->group : '';
163
-        $query .= $this->having ? ' HAVING ' . $this->having : '';
164
-        $query .= $this->order ? ' ORDER BY ' . $this->order : '';
159
+        $query .= $this->select.' FROM '.$this->table;
160
+        $query .= $this->join ? ' '.$this->join : '';
161
+        $query .= $this->where ? ' WHERE '.$this->where : '';
162
+        $query .= $this->group ? ' GROUP BY '.$this->group : '';
163
+        $query .= $this->having ? ' HAVING '.$this->having : '';
164
+        $query .= $this->order ? ' ORDER BY '.$this->order : '';
165 165
 
166 166
         if ($this->limit !== -1) {
167 167
             $query .= ' LIMIT ';
168 168
 
169 169
             if ($this->offset !== -1) {
170
-                $query .= $this->offset . ',';
170
+                $query .= $this->offset.',';
171 171
             }
172 172
 
173 173
             $query .= $this->limit;
Please login to merge, or discard this patch.
widget/ActionsGridColumn.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,9 +79,9 @@
 block discarded – undo
79 79
         $result = [];
80 80
 
81 81
         foreach ($this->buttons AS $key => $row) {
82
-            $result['{' . $key . '}'] = Html::href(
82
+            $result['{'.$key.'}'] = Html::href(
83 83
                 !empty($row['text']) ? $row['text'] : $key,
84
-                $this->params['link'] . (!empty($row['link']) ? $row['link'] : '/') . $this->params['pKey'],
84
+                $this->params['link'].(!empty($row['link']) ? $row['link'] : '/').$this->params['pKey'],
85 85
                 !empty($row['attributes']) ? $row['attributes'] : []
86 86
             );
87 87
         }
Please login to merge, or discard this patch.