Completed
Push — master ( ebf9fc...f88857 )
by Oleg
03:40
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.
db/drivers/MysqlDriver.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $sql = 'SHOW TABLES;';
170 170
 
171 171
         if ($this->getDriverType() == 'pgsql') {
172
-            $sql = 'SELECT table_name FROM information_schema.tables WHERE table_schema = \'' . $this->tableSchema . '\'';
172
+            $sql = 'SELECT table_name FROM information_schema.tables WHERE table_schema = \''.$this->tableSchema.'\'';
173 173
         }
174 174
 
175 175
         return $this->conn->query($sql)->fetchAll(\PDO::FETCH_COLUMN, 0);
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             foreach ($sth->fetchAll(\PDO::FETCH_ASSOC) as $row) {
228 228
                 $result[] = [
229 229
                     'field' => $row['column_name'],
230
-                    'type' => $row['data_type'] . (($max = $row['character_maximum_length']) ? '(' . $max . ')' : ''),
230
+                    'type' => $row['data_type'].(($max = $row['character_maximum_length']) ? '('.$max.')' : ''),
231 231
                     'null' => $row['is_nullable'],
232 232
                     'default' => $row['column_default']
233 233
                 ];
@@ -278,10 +278,10 @@  discard block
 block discarded – undo
278 278
      */
279 279
     public function insert($table, array $line = [], $multi = false)
280 280
     {
281
-        $fields = '`' . implode('`, `', array_keys($multi ? $line[0] : $line)) . '`';
281
+        $fields = '`'.implode('`, `', array_keys($multi ? $line[0] : $line)).'`';
282 282
 
283 283
         if ($this->getDriverType() === 'pgsql') {
284
-            $fields = '"' . implode('", "', array_keys($multi ? $line[0] : $line)) . '"';
284
+            $fields = '"'.implode('", "', array_keys($multi ? $line[0] : $line)).'"';
285 285
         }
286 286
 
287 287
         $values = ':'.implode(', :', array_keys($multi ? $line[0] : $line));
@@ -341,10 +341,10 @@  discard block
 block discarded – undo
341 341
     {
342 342
         $keys = [];
343 343
         foreach ($params AS $key => $val) {
344
-            $keys[] = $table . '.' . $key . '=\'' . $val . '\'';
344
+            $keys[] = $table.'.'.$key.'=\''.$val.'\'';
345 345
         }
346 346
 
347
-        $sth = $this->conn->prepare('SELECT * FROM ' . $table . ' WHERE ' . implode(' AND ', $keys) . ' LIMIT 1;');
347
+        $sth = $this->conn->prepare('SELECT * FROM '.$table.' WHERE '.implode(' AND ', $keys).' LIMIT 1;');
348 348
         /** @noinspection PdoApiUsageInspection */
349 349
         $sth->execute();
350 350
 
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.