Passed
Push — develop ( 963f5e...46a4a0 )
by nguereza
02:17
created
src/Connection.php 2 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   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 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
Please login to merge, or discard this patch.
src/Exception/TransactionException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,6 +36,5 @@
 block discarded – undo
36 36
  * @class TransactionException
37 37
  * @package Platine\Database\Exception
38 38
  */
39
-class TransactionException extends DatabaseException
40
-{
39
+class TransactionException extends DatabaseException {
41 40
 }
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/ConnectionException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,6 +36,5 @@
 block discarded – undo
36 36
  * @class ConnectionException
37 37
  * @package Platine\Database\Exception
38 38
  */
39
-class ConnectionException extends DatabaseException
40
-{
39
+class ConnectionException extends DatabaseException {
41 40
 }
Please login to merge, or discard this patch.
src/Exception/DatabaseException.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 DatabaseException
39 39
  * @package Platine\Database\Exception
40 40
  */
41
-class DatabaseException extends Exception
42
-{
41
+class DatabaseException extends Exception {
43 42
 }
Please login to merge, or discard this patch.
src/Exception/QueryPrepareException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,6 +36,5 @@
 block discarded – undo
36 36
  * @class QueryPrepareException
37 37
  * @package Platine\Database\Exception
38 38
  */
39
-class QueryPrepareException extends DatabaseException
40
-{
39
+class QueryPrepareException extends DatabaseException {
41 40
 }
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
@@ -36,6 +36,5 @@
 block discarded – undo
36 36
  * @class QueryException
37 37
  * @package Platine\Database\Exception
38 38
  */
39
-class QueryException extends DatabaseException
40
-{
39
+class QueryException extends DatabaseException {
41 40
 }
Please login to merge, or discard this patch.
src/Query/Expression.php 2 patches
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.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @param string|array<string> $tables
112 112
      * @return SelectStatement
113 113
      */
114
-    public function from(string|array $tables): SelectStatement
114
+    public function from(string | array $tables): SelectStatement
115 115
     {
116 116
         $subQuery = new SubQuery();
117 117
         $this->addExpression('subquery', $subQuery);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      * @return $this
126 126
      */
127 127
     public function count(
128
-        string|array|Expression|Closure $column = '*',
128
+        string | array | Expression | Closure $column = '*',
129 129
         bool $distinct = false
130 130
     ): self {
131 131
         if (!is_array($column)) {
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      * @param bool $distinct
146 146
      * @return $this
147 147
      */
148
-    public function sum(string|Expression|Closure $column, bool $distinct = false): self
148
+    public function sum(string | Expression | Closure $column, bool $distinct = false): self
149 149
     {
150 150
         return $this->addFunction(
151 151
             'aggregateFunction',
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      * @param bool $distinct
161 161
      * @return $this
162 162
      */
163
-    public function avg(string|Expression|Closure $column, bool $distinct = false): self
163
+    public function avg(string | Expression | Closure $column, bool $distinct = false): self
164 164
     {
165 165
         return $this->addFunction(
166 166
             'aggregateFunction',
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      * @param bool $distinct
176 176
      * @return $this
177 177
      */
178
-    public function min(string|Expression|Closure $column, bool $distinct = false): self
178
+    public function min(string | Expression | Closure $column, bool $distinct = false): self
179 179
     {
180 180
         return $this->addFunction(
181 181
             'aggregateFunction',
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
      * @param bool $distinct
191 191
      * @return $this
192 192
      */
193
-    public function max(string|Expression|Closure $column, bool $distinct = false): self
193
+    public function max(string | Expression | Closure $column, bool $distinct = false): self
194 194
     {
195 195
         return $this->addFunction(
196 196
             'aggregateFunction',
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     protected function addFunction(
239 239
         string $type,
240 240
         string $name,
241
-        string|Closure|array|Expression $column,
241
+        string | Closure | array | Expression $column,
242 242
         array $arguments = []
243 243
     ): self {
244 244
         if ($column instanceof Closure) {
Please login to merge, or discard this patch.
src/Query/Join.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * @class Join
53 53
  * @package Platine\Database\Query
54 54
  */
55
-class Join
56
-{
55
+class Join {
57 56
     /**
58 57
      * The Join conditions
59 58
      * @var array<int, mixed>
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
      * @return $this
76 76
      */
77 77
     public function on(
78
-        string|Expression|Closure $column1,
79
-        string|Expression|Closure|bool|null $column2 = null,
78
+        string | Expression | Closure $column1,
79
+        string | Expression | Closure | bool | null $column2 = null,
80 80
         string $operator = '='
81 81
     ): self {
82 82
         return $this->addJoinCondition($column1, $column2, $operator, 'AND');
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
      * @return $this
90 90
      */
91 91
     public function andOn(
92
-        string|Expression|Closure $column1,
93
-        string|Expression|Closure|bool|null $column2 = null,
92
+        string | Expression | Closure $column1,
93
+        string | Expression | Closure | bool | null $column2 = null,
94 94
         string $operator = '='
95 95
     ): self {
96 96
         return $this->addJoinCondition($column1, $column2, $operator, 'AND');
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
      * @return $this
104 104
      */
105 105
     public function orOn(
106
-        string|Expression|Closure $column1,
107
-        string|Expression|Closure|bool|null $column2 = null,
106
+        string | Expression | Closure $column1,
107
+        string | Expression | Closure | bool | null $column2 = null,
108 108
         string $operator = '='
109 109
     ): self {
110 110
         return $this->addJoinCondition($column1, $column2, $operator, 'OR');
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      * @param string $separator
116 116
      * @return $this
117 117
      */
118
-    protected function addJoinExpression(Expression|Closure $expression, string $separator = 'AND'): self
118
+    protected function addJoinExpression(Expression | Closure $expression, string $separator = 'AND'): self
119 119
     {
120 120
         if ($expression instanceof Closure) {
121 121
             $expression = Expression::fromClosure($expression);
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
      * @return $this
139 139
      */
140 140
     protected function addJoinCondition(
141
-        string|Expression|Closure $column1,
142
-        string|Expression|Closure|bool|null $column2,
141
+        string | Expression | Closure $column1,
142
+        string | Expression | Closure | bool | null $column2,
143 143
         string $operator,
144 144
         string $separator = 'AND'
145 145
     ): self {
Please login to merge, or discard this patch.