Passed
Push — develop ( cd2c29...4f7ba8 )
by nguereza
02:28
created
src/Connection.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -376,7 +376,7 @@
 block discarded – undo
376 376
 
377 377
         return (string) preg_replace_callback(
378 378
             '/\?/',
379
-            function () use ($driver, &$params) {
379
+            function() use ($driver, &$params) {
380 380
                 $param = array_shift($params);
381 381
 
382 382
                 $value = is_object($param) ? get_class($param) : $param;
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
  * Class Connection
62 62
  * @package Platine\Database
63 63
  */
64
-class Connection
65
-{
64
+class Connection {
66 65
     /**
67 66
      * The PDO instance
68 67
      * @var PDO
@@ -346,8 +345,7 @@  discard block
 block discarded – undo
346 345
      * @return mixed
347 346
      * @throws QueryException
348 347
      */
349
-    public function column(string $sql, array $params = [])
350
-    {
348
+    public function column(string $sql, array $params = []) {
351 349
         $prepared = $this->prepare($sql, $params);
352 350
         $this->execute($prepared);
353 351
 
@@ -400,8 +398,7 @@  discard block
 block discarded – undo
400 398
     /**
401 399
      * {@inheritdoc}
402 400
      */
403
-    public function __sleep()
404
-    {
401
+    public function __sleep() {
405 402
         return [
406 403
             'dsn',
407 404
             'driver',
@@ -415,8 +412,7 @@  discard block
 block discarded – undo
415 412
     /**
416 413
      * {@inheritdoc}
417 414
      */
418
-    public function __wakeup()
419
-    {
415
+    public function __wakeup() {
420 416
         $this->createPDO();
421 417
     }
422 418
 
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -475,12 +475,12 @@
 block discarded – undo
475 475
         }
476 476
     }
477 477
 
478
-     /**
479
-     * Change the query parameters placeholder with the value
480
-     * @param string $query
481
-     * @param array<int, mixed> $params
482
-     * @return string
483
-     */
478
+        /**
479
+         * Change the query parameters placeholder with the value
480
+         * @param string $query
481
+         * @param array<int, mixed> $params
482
+         * @return string
483
+         */
484 484
     protected function replaceParameters(string $query, array $params): string
485 485
     {
486 486
         $driver = $this->driver;
Please login to merge, or discard this patch.
src/Exception/ConnectionException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
38 38
  * Class ConnectionException
39 39
  * @package Platine\Database\Exception
40 40
  */
41
-class ConnectionException extends Exception
42
-{
41
+class ConnectionException extends Exception {
43 42
 }
Please login to merge, or discard this patch.
src/Query/DeleteStatement.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,16 +50,14 @@  discard block
 block discarded – undo
50 50
  * Class DeleteStatement
51 51
  * @package Platine\Database\Query
52 52
  */
53
-class DeleteStatement extends BaseStatement
54
-{
53
+class DeleteStatement extends BaseStatement {
55 54
 
56 55
     /**
57 56
      * DeleteStatement constructor.
58 57
      * @param string|array<string> $from
59 58
      * @param QueryStatement|null $queryStatement
60 59
      */
61
-    public function __construct($from, QueryStatement $queryStatement = null)
62
-    {
60
+    public function __construct($from, QueryStatement $queryStatement = null) {
63 61
         parent::__construct($queryStatement);
64 62
 
65 63
         if (!is_array($from)) {
@@ -73,8 +71,7 @@  discard block
 block discarded – undo
73 71
      * @param string|array<string> $tables
74 72
      * @return mixed
75 73
      */
76
-    public function delete($tables = [])
77
-    {
74
+    public function delete($tables = []) {
78 75
         if (!is_array($tables)) {
79 76
             /** @var array<string> $tables */
80 77
             $tables = [$tables];
Please login to merge, or discard this patch.
src/Query/Where.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -292,7 +292,7 @@
 block discarded – undo
292 292
         bool $isColumn = false
293 293
     ): WhereStatement {
294 294
         if ($isColumn && is_string($value)) {
295
-            $value = function (Expression $expr) use ($value) {
295
+            $value = function(Expression $expr) use ($value) {
296 296
                 return $expr->column($value);
297 297
             };
298 298
         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@  discard block
 block discarded – undo
52 52
  * Class Where
53 53
  * @package Platine\Database\Query
54 54
  */
55
-class Where
56
-{
55
+class Where {
57 56
     /**
58 57
      * @var string|Expression
59 58
      */
@@ -270,8 +269,7 @@  discard block
 block discarded – undo
270 269
     /**
271 270
      * @inheritDoc
272 271
      */
273
-    public function __clone()
274
-    {
272
+    public function __clone() {
275 273
         if ($this->column instanceof Expression) {
276 274
             $this->column = clone $this->column;
277 275
         }
Please login to merge, or discard this patch.
src/Query/Update.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -125,11 +125,11 @@
 block discarded – undo
125 125
 
126 126
         foreach ($columns as $key => $val) {
127 127
             if (is_numeric($key)) {
128
-                $values[$val] = function (Expression $expr) use ($sign, $val, $value) {
128
+                $values[$val] = function(Expression $expr) use ($sign, $val, $value) {
129 129
                     $expr->column($val)->op($sign)->value($value);
130 130
                 };
131 131
             } else {
132
-                $values[$key] = function (Expression $expr) use ($sign, $key, $val) {
132
+                $values[$key] = function(Expression $expr) use ($sign, $key, $val) {
133 133
                     $expr->column($key)->op($sign)->value($val);
134 134
                 };
135 135
             }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@  discard block
 block discarded – undo
52 52
  * Class Update
53 53
  * @package Platine\Database\Query
54 54
  */
55
-class Update extends UpdateStatement
56
-{
55
+class Update extends UpdateStatement {
57 56
     /**
58 57
      * @var Connection
59 58
      */
@@ -65,8 +64,7 @@  discard block
 block discarded – undo
65 64
      * @param string|array<int, string> $table
66 65
      * @param QueryStatement|null $queryStatement
67 66
      */
68
-    public function __construct(Connection $connection, $table, QueryStatement $queryStatement = null)
69
-    {
67
+    public function __construct(Connection $connection, $table, QueryStatement $queryStatement = null) {
70 68
         parent::__construct($table, $queryStatement);
71 69
 
72 70
         $this->connection = $connection;
Please login to merge, or discard this patch.
src/Pool.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
                 !empty($config['connections'])
79 79
                 && is_array($config['connections'])
80 80
             ) {
81
-                 /** @var array<string, array<string, mixed>> $connections */
81
+                    /** @var array<string, array<string, mixed>> $connections */
82 82
                 $connections = $config['connections'];
83 83
 
84 84
                 foreach ($connections as $name => $connection) {
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
  * Class Pool
54 54
  * @package Platine\Database
55 55
  */
56
-class Pool
57
-{
56
+class Pool {
58 57
     /**
59 58
      * The default connection name
60 59
      * @var string
@@ -71,8 +70,7 @@  discard block
 block discarded – undo
71 70
      * Class constructor
72 71
      * @param array<string, mixed> $config
73 72
      */
74
-    public function __construct(array $config = [])
75
-    {
73
+    public function __construct(array $config = []) {
76 74
         if (!empty($config)) {
77 75
             if (
78 76
                 !empty($config['connections'])
Please login to merge, or discard this patch.
src/Exception/ConnectionNotFoundException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
38 38
  * Class ConnectionNotFoundException
39 39
  * @package Platine\Database\Exception
40 40
  */
41
-class ConnectionNotFoundException extends Exception
42
-{
41
+class ConnectionNotFoundException extends Exception {
43 42
 }
Please login to merge, or discard this patch.
src/Exception/ConnectionAlreadyExistsException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
38 38
  * Class ConnectionAlreadyExistsException
39 39
  * @package Platine\Database\Exception
40 40
  */
41
-class ConnectionAlreadyExistsException extends Exception
42
-{
41
+class ConnectionAlreadyExistsException extends Exception {
43 42
 }
Please login to merge, or discard this patch.
src/Exception/QueryException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,6 @@
 block discarded – undo
38 38
  * Class QueryException
39 39
  * @package Platine\Database\Exception
40 40
  */
41
-class QueryException extends RuntimeException
42
-{
41
+class QueryException extends RuntimeException {
43 42
 
44 43
 }
Please login to merge, or discard this patch.