Passed
Push — develop ( 306891...b67689 )
by nguereza
02:39
created
src/Connection.php 1 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
@@ -401,8 +400,7 @@  discard block
 block discarded – undo
401 400
      * @return mixed
402 401
      * @throws QueryException
403 402
      */
404
-    public function column(string $sql, array $params = [])
405
-    {
403
+    public function column(string $sql, array $params = []) {
406 404
         $prepared = $this->prepare($sql, $params);
407 405
         $this->execute($prepared);
408 406
 
@@ -454,8 +452,7 @@  discard block
 block discarded – undo
454 452
     /**
455 453
      * {@inheritdoc}
456 454
      */
457
-    public function __sleep()
458
-    {
455
+    public function __sleep() {
459 456
         return [
460 457
             'dsn',
461 458
             'driver',
@@ -469,8 +466,7 @@  discard block
 block discarded – undo
469 466
     /**
470 467
      * {@inheritdoc}
471 468
      */
472
-    public function __wakeup()
473
-    {
469
+    public function __wakeup() {
474 470
         $this->createPDO();
475 471
     }
476 472
 
Please login to merge, or discard this patch.
src/ResultSet.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
  * @class ResultSet
55 55
  * @package Platine\Database
56 56
  */
57
-class ResultSet
58
-{
57
+class ResultSet {
59 58
     /**
60 59
      * The PDOStatement instance
61 60
      * @var PDOStatement
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
      * Class constructor
67 66
      * @param PDOStatement $statement
68 67
      */
69
-    public function __construct(PDOStatement $statement)
70
-    {
68
+    public function __construct(PDOStatement $statement) {
71 69
         $this->statement = $statement;
72 70
     }
73 71
 
@@ -75,8 +73,7 @@  discard block
 block discarded – undo
75 73
      * Destructor of the class
76 74
      *
77 75
      */
78
-    public function __destruct()
79
-    {
76
+    public function __destruct() {
80 77
         $this->statement->closeCursor();
81 78
     }
82 79
 
@@ -95,8 +92,7 @@  discard block
 block discarded – undo
95 92
      * @param int $fetchStyle the PDO fetch style
96 93
      * @return array<int, mixed>|false
97 94
      */
98
-    public function all(callable $callable = null, int $fetchStyle = 0)
99
-    {
95
+    public function all(callable $callable = null, int $fetchStyle = 0) {
100 96
         if ($callable === null) {
101 97
             return $this->statement->fetchAll($fetchStyle);
102 98
         }
@@ -109,8 +105,7 @@  discard block
 block discarded – undo
109 105
      * @param callable $callable
110 106
      * @return array<int, mixed>|false
111 107
      */
112
-    public function allGroup(bool $uniq = false, callable $callable = null)
113
-    {
108
+    public function allGroup(bool $uniq = false, callable $callable = null) {
114 109
         $fetchStyle = PDO::FETCH_GROUP | ($uniq ? PDO::FETCH_UNIQUE : 0);
115 110
 
116 111
         if ($callable === null) {
@@ -124,8 +119,7 @@  discard block
 block discarded – undo
124 119
      * @param callable $callable
125 120
      * @return mixed
126 121
      */
127
-    public function get(callable $callable = null)
128
-    {
122
+    public function get(callable $callable = null) {
129 123
         $result = $this->statement->fetch();
130 124
         $this->statement->closeCursor();
131 125
         if ($callable !== null) {
@@ -140,8 +134,7 @@  discard block
 block discarded – undo
140 134
      *
141 135
      * @return mixed
142 136
      */
143
-    public function next()
144
-    {
137
+    public function next() {
145 138
         return $this->statement->fetch();
146 139
     }
147 140
 
@@ -149,8 +142,7 @@  discard block
 block discarded – undo
149 142
      * Close the cursor
150 143
      * @return mixed
151 144
      */
152
-    public function flush()
153
-    {
145
+    public function flush() {
154 146
         return $this->statement->closeCursor();
155 147
     }
156 148
 
@@ -160,8 +152,7 @@  discard block
 block discarded – undo
160 152
      *
161 153
      * @return mixed
162 154
      */
163
-    public function column(int $col = 0)
164
-    {
155
+    public function column(int $col = 0) {
165 156
         return $this->statement->fetchColumn($col);
166 157
     }
167 158
 
Please login to merge, or discard this patch.
src/ConnectionStatement.php 1 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 ConnectionStatement
53 53
  * @package Platine\Database
54 54
  */
55
-class ConnectionStatement extends PDOStatement
56
-{
55
+class ConnectionStatement extends PDOStatement {
57 56
     /**
58 57
      * {@inheritdoc}
59 58
      */
@@ -81,8 +80,7 @@  discard block
 block discarded – undo
81 80
     /**
82 81
      * {@inheritdoc}
83 82
      */
84
-    public function fetchColumn($column = null)
85
-    {
83
+    public function fetchColumn($column = null) {
86 84
         return false;
87 85
     }
88 86
 }
Please login to merge, or discard this patch.
src/Query/Delete.php 1 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 Delete
54 54
  * @package Platine\Database\Query
55 55
  */
56
-class Delete extends DeleteStatement
57
-{
56
+class Delete extends DeleteStatement {
58 57
     /**
59 58
      * @var Connection
60 59
      */
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
      * @param string|array<string> $from
67 66
      * @param QueryStatement|null $queryStatement
68 67
      */
69
-    public function __construct(Connection $connection, $from, QueryStatement $queryStatement = null)
70
-    {
68
+    public function __construct(Connection $connection, $from, QueryStatement $queryStatement = null) {
71 69
         parent::__construct($from, $queryStatement);
72 70
 
73 71
         $this->connection = $connection;
Please login to merge, or discard this patch.
src/Query/SubQuery.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
  * @class SubQuery
51 51
  * @package Platine\Database\Query
52 52
  */
53
-class SubQuery
54
-{
53
+class SubQuery {
55 54
     /**
56 55
      * The SelectStatement instance
57 56
      * @var SelectStatement
@@ -78,8 +77,7 @@  discard block
 block discarded – undo
78 77
     /**
79 78
      * @inheritDoc
80 79
      */
81
-    public function __clone()
82
-    {
80
+    public function __clone() {
83 81
         $this->select = clone $this->select;
84 82
     }
85 83
 }
Please login to merge, or discard this patch.
src/Query/Update.php 1 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/Query/Where.php 1 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/Expression.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * @class Expression
53 53
  * @package Platine\Database\Query
54 54
  */
55
-class Expression
56
-{
55
+class Expression {
57 56
     /**
58 57
      * The list of expression
59 58
      * @var array<int, array<string, mixed>>
Please login to merge, or discard this patch.
src/Query/Insert.php 1 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 Insert
53 53
  * @package Platine\Database\Query
54 54
  */
55
-class Insert extends InsertStatement
56
-{
55
+class Insert extends InsertStatement {
57 56
     /**
58 57
      * @var Connection
59 58
      */
@@ -64,8 +63,7 @@  discard block
 block discarded – undo
64 63
      * @param Connection $connection
65 64
      * @param QueryStatement|null $queryStatement
66 65
      */
67
-    public function __construct(Connection $connection, QueryStatement $queryStatement = null)
68
-    {
66
+    public function __construct(Connection $connection, QueryStatement $queryStatement = null) {
69 67
         parent::__construct($queryStatement);
70 68
 
71 69
         $this->connection = $connection;
Please login to merge, or discard this patch.