Completed
Push — master ( aaac57...e2ab3e )
by Oleg
05:20
created
base/Injector.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      *
60 60
      * @access public
61 61
      * @param string $name
62
-     * @param mixed $component
62
+     * @param Dispatcher $component
63 63
      * @return void
64 64
      */
65 65
     public function addRequirement($name, $component)
Please login to merge, or discard this patch.
mvc/models/Model.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
     public static function finder(IQuery $query = null, $single = false)
108 108
     {
109 109
         $query = ($query instanceof Query) ? $query : new Query((new ConnectionInjector)->build());
110
-        $query->table = static::$tableName . ' m';
110
+        $query->table = static::$tableName.' m';
111 111
         $query->objectName = get_called_class();
112 112
         $query->single = $single;
113 113
 
Please login to merge, or discard this patch.
auth/Rbac.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
         $query->distinct = true;
156 156
         $query->select = $this->db->getDriverType() == 'pgsql' ? '"role" AS "name"' : '`role` AS `name`';
157 157
         $query->table = $this->db->getDriverType() == 'pgsql' ? '"rbac_user"' : '`rbac_user`';
158
-        $query->addWhere(($this->db->getDriverType() == 'pgsql' ? '"user"=' : '`user`=') . $userId);
158
+        $query->addWhere(($this->db->getDriverType() == 'pgsql' ? '"user"=' : '`user`=').$userId);
159 159
         $query->single = false;
160 160
 
161 161
         return $query->run(\PDO::FETCH_ASSOC);
Please login to merge, or discard this patch.
mvc/models/Query.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -165,17 +165,17 @@
 block discarded – undo
165 165
 
166 166
         if ($this->db->getDriverType() === 'pgsql') {
167 167
             if ($this->limit !== -1) {
168
-                $query .= ' LIMIT ' . $this->limit . ' ';
168
+                $query .= ' LIMIT '.$this->limit.' ';
169 169
             }
170 170
             if ($this->offset !== -1) {
171
-                $query .= ' OFFSET ' . $this->offset . ' ';
171
+                $query .= ' OFFSET '.$this->offset.' ';
172 172
             }
173 173
         } else {
174 174
             if ($this->limit !== -1) {
175 175
                 $query .= ' LIMIT ';
176 176
 
177 177
                 if ($this->offset !== -1) {
178
-                    $query .= $this->offset . ',';
178
+                    $query .= $this->offset.',';
179 179
                 }
180 180
 
181 181
                 $query .= $this->limit;
Please login to merge, or discard this patch.
cache/driver/DbDriver.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -81,6 +81,7 @@
 block discarded – undo
81 81
     /**
82 82
      * @inheritdoc
83 83
      * @throws \Micro\Base\Exception
84
+     * @param string $name
84 85
      */
85 86
     protected function getElement($name)
86 87
     {
Please login to merge, or discard this patch.
db/Connection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         unset($this->driver);
55 55
 
56
-        $class = '\Micro\Db\Drivers\\' . ucfirst(substr($dsn, 0, strpos($dsn, ':'))) . 'Connection';
56
+        $class = '\Micro\Db\Drivers\\'.ucfirst(substr($dsn, 0, strpos($dsn, ':'))).'Connection';
57 57
 
58 58
         $this->driver = new $class($dsn, $config, $options);
59 59
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     public function __call($name, array $arguments = [])
73 73
     {
74 74
         if (!method_exists($this->driver, $name)) {
75
-            throw new \BadMethodCallException('Method `' . $name . '` not found in connection driver `' . get_class($this->driver) . '`');
75
+            throw new \BadMethodCallException('Method `'.$name.'` not found in connection driver `'.get_class($this->driver).'`');
76 76
         }
77 77
 
78 78
         return call_user_func_array([$this->driver, $name], $arguments);
Please login to merge, or discard this patch.
db/drivers/MysqlDriver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      */
201 201
     public function insert($table, array $line = [], $multi = false)
202 202
     {
203
-        $fields = '`' . implode('`, `', array_keys($multi ? $line[0] : $line)) . '`';
203
+        $fields = '`'.implode('`, `', array_keys($multi ? $line[0] : $line)).'`';
204 204
 
205 205
         $values = ':'.implode(', :', array_keys($multi ? $line[0] : $line));
206 206
         $rows = $multi ? $line : [$line];
@@ -309,10 +309,10 @@  discard block
 block discarded – undo
309 309
         $keys = [];
310 310
 
311 311
         foreach ($params AS $key => $val) {
312
-            $keys[] = $table . '.' . $key . '=\'' . $val . '\'';
312
+            $keys[] = $table.'.'.$key.'=\''.$val.'\'';
313 313
         }
314 314
 
315
-        $sth = $this->conn->prepare('SELECT * FROM ' . $table . ' WHERE ' . implode(' AND ', $keys) . ' LIMIT 1;');
315
+        $sth = $this->conn->prepare('SELECT * FROM '.$table.' WHERE '.implode(' AND ', $keys).' LIMIT 1;');
316 316
         /** @noinspection PdoApiUsageInspection */
317 317
         $sth->execute();
318 318
 
Please login to merge, or discard this patch.
db/drivers/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
         } catch (\PDOException $e) {
44 44
             if (!array_key_exists('ignoreFail', $config) || !$config['ignoreFail']) {
45
-                throw new Exception('Connect to DB failed: ' . $e->getMessage());
45
+                throw new Exception('Connect to DB failed: '.$e->getMessage());
46 46
             }
47 47
         }
48 48
     }
Please login to merge, or discard this patch.
db/drivers/PgsqlDriver.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      *
51 51
      * @param string $dbName Database name
52 52
      *
53
-     * @return boolean
53
+     * @return boolean|null
54 54
      * @throws \InvalidArgumentException
55 55
      */
56 56
     public function switchDatabase($dbName)
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      * @param array $elements Elements to update
222 222
      * @param string $conditions Conditions for search
223 223
      *
224
-     * @return bool
224
+     * @return boolean|null
225 225
      */
226 226
     public function update($table, array $elements = [], $conditions = '')
227 227
     {
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
      * @param string $conditions Conditions to search
238 238
      * @param array $params Params array
239 239
      *
240
-     * @return bool
240
+     * @return boolean|null
241 241
      */
242 242
     public function delete($table, $conditions, array $params = [])
243 243
     {
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      * @param string $table Table name
268 268
      * @param array $params Params array
269 269
      *
270
-     * @return bool
270
+     * @return boolean|null
271 271
      */
272 272
     public function exists($table, array $params = [])
273 273
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public function listTables()
82 82
     {
83 83
         return $this->conn->query(
84
-            'SELECT table_name FROM information_schema.tables WHERE table_schema = \'' . $this->tableSchema . '\''
84
+            'SELECT table_name FROM information_schema.tables WHERE table_schema = \''.$this->tableSchema.'\''
85 85
         )->fetchAll(\PDO::FETCH_COLUMN, 0);
86 86
     }
87 87
 
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
      */
150 150
     public function listFields($table)
151 151
     {
152
-        $sth = $this->conn->query('SELECT * FROM information_schema.columns WHERE table_name =\'' . $table . '\'');
152
+        $sth = $this->conn->query('SELECT * FROM information_schema.columns WHERE table_name =\''.$table.'\'');
153 153
         $result = [];
154 154
 
155 155
         foreach ($sth->fetchAll(\PDO::FETCH_ASSOC) as $row) {
156 156
             $result[] = [
157 157
                 'field' => $row['column_name'],
158
-                'type' => $row['data_type'] . (($max = $row['character_maximum_length']) ? '(' . $max . ')' : ''),
158
+                'type' => $row['data_type'].(($max = $row['character_maximum_length']) ? '('.$max.')' : ''),
159 159
                 'null' => $row['is_nullable'],
160 160
                 'default' => $row['column_default']
161 161
             ];
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
      */
193 193
     public function insert($table, array $line = [], $multi = false)
194 194
     {
195
-        $fields = '"' . implode('", "', array_keys($multi ? $line[0] : $line)) . '"';
196
-        $values = ':' . implode(', :', array_keys($multi ? $line[0] : $line));
195
+        $fields = '"'.implode('", "', array_keys($multi ? $line[0] : $line)).'"';
196
+        $values = ':'.implode(', :', array_keys($multi ? $line[0] : $line));
197 197
         $rows = $multi ? $line : [$line];
198 198
         $id = null;
199 199
 
Please login to merge, or discard this patch.