Passed
Push — develop ( f7d7c9...8d836b )
by nguereza
12:43
created
src/Query/HavingExpression.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     /**
73 73
      * @var string|Expression
74 74
      */
75
-    protected string|Expression $column;
75
+    protected string | Expression $column;
76 76
 
77 77
     /**
78 78
      * @var string
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      * @param string $separator
96 96
      * @return $this
97 97
      */
98
-    public function init(string|Expression|Closure $column, string $separator): self
98
+    public function init(string | Expression | Closure $column, string $separator): self
99 99
     {
100 100
         if ($column instanceof Closure) {
101 101
             $column = Expression::fromClosure($column);
Please login to merge, or discard this patch.
src/Query/UpdateStatement.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
      * @param QueryStatement|null $queryStatement
65 65
      */
66 66
     public function __construct(
67
-        string|array $table,
67
+        string | array $table,
68 68
         ?QueryStatement $queryStatement = null
69 69
     ) {
70 70
         parent::__construct($queryStatement);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@
 block discarded – undo
50 50
  * @class UpdateStatement
51 51
  * @package Platine\Database\Query
52 52
  */
53
-class UpdateStatement extends BaseStatement
54
-{
53
+class UpdateStatement extends BaseStatement {
55 54
     /**
56 55
      * The Query statement instance
57 56
      * @var QueryStatement
Please login to merge, or discard this patch.
src/Query/WhereStatement.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -91,9 +91,9 @@  discard block
 block discarded – undo
91 91
      * @return WhereStatement|Where|Select|Delete|Update
92 92
      */
93 93
     public function where(
94
-        string|Expression|Closure $column,
94
+        string | Expression | Closure $column,
95 95
         bool $isExpression = false
96
-    ): WhereStatement|Where|Select|Delete|Update {
96
+    ): WhereStatement | Where | Select | Delete | Update {
97 97
         return $this->addWhereCondition($column, 'AND', $isExpression);
98 98
     }
99 99
 
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
      * @return WhereStatement|Where|Select|Delete|Update
105 105
      */
106 106
     public function orWhere(
107
-        string|Expression|Closure $column,
107
+        string | Expression | Closure $column,
108 108
         bool $isExpression = false
109
-    ): WhereStatement|Where|Select|Delete|Update {
109
+    ): WhereStatement | Where | Select | Delete | Update {
110 110
         return $this->addWhereCondition($column, 'OR', $isExpression);
111 111
     }
112 112
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      * @param Closure $select
115 115
      * @return WhereStatement|Select|Delete|Update
116 116
      */
117
-    public function whereExists(Closure $select): WhereStatement|Select|Delete|Update
117
+    public function whereExists(Closure $select): WhereStatement | Select | Delete | Update
118 118
     {
119 119
         return $this->addWhereExistsCondition($select, 'AND', false);
120 120
     }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      * @param Closure $select
124 124
      * @return WhereStatement|Select|Delete|Update
125 125
      */
126
-    public function orWhereExists(Closure $select): WhereStatement|Select|Delete|Update
126
+    public function orWhereExists(Closure $select): WhereStatement | Select | Delete | Update
127 127
     {
128 128
         return $this->addWhereExistsCondition($select, 'OR', false);
129 129
     }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      * @param Closure $select
133 133
      * @return WhereStatement|Select|Delete|Update
134 134
      */
135
-    public function whereNotExists(Closure $select): WhereStatement|Select|Delete|Update
135
+    public function whereNotExists(Closure $select): WhereStatement | Select | Delete | Update
136 136
     {
137 137
         return $this->addWhereExistsCondition($select, 'AND', true);
138 138
     }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      * @param Closure $select
142 142
      * @return WhereStatement|Select|Delete|Update
143 143
      */
144
-    public function orWhereNotExists(Closure $select): WhereStatement|Select|Delete|Update
144
+    public function orWhereNotExists(Closure $select): WhereStatement | Select | Delete | Update
145 145
     {
146 146
         return $this->addWhereExistsCondition($select, 'OR', true);
147 147
     }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         mixed $column,
167 167
         string $separator = 'AND',
168 168
         bool $isExpression = false
169
-    ): WhereStatement|Where {
169
+    ): WhereStatement | Where {
170 170
         if (($column instanceof Closure) && !$isExpression) {
171 171
             $this->queryStatement->addWhereGroup($column, $separator);
172 172
 
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 WhereStatement
53 53
  * @package Platine\Database\Query
54 54
  */
55
-class WhereStatement
56
-{
55
+class WhereStatement {
57 56
     /**
58 57
      * The Query statement instance
59 58
      * @var QueryStatement
@@ -70,8 +69,7 @@  discard block
 block discarded – undo
70 69
      * WhereStatement constructor.
71 70
      * @param QueryStatement|null $queryStatement
72 71
      */
73
-    public function __construct(?QueryStatement $queryStatement = null)
74
-    {
72
+    public function __construct(?QueryStatement $queryStatement = null) {
75 73
         $this->queryStatement = $queryStatement ?? new QueryStatement();
76 74
         $this->where = new Where($this, $this->queryStatement);
77 75
     }
Please login to merge, or discard this patch.
src/Query/ColumnExpression.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * @param string|null $alias
68 68
      * @return $this
69 69
      */
70
-    public function column(string|Expression|Closure $name, string $alias = null): self
70
+    public function column(string | Expression | Closure $name, string $alias = null): self
71 71
     {
72 72
         $this->queryStatement->addColumn($name, $alias);
73 73
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      * @return $this
105 105
      */
106 106
     public function count(
107
-        string|array|Expression|Closure $column = '*',
107
+        string | array | Expression | Closure $column = '*',
108 108
         ?string $alias = null,
109 109
         bool $distinct = false
110 110
     ): self {
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      * @return $this
122 122
      */
123 123
     public function avg(
124
-        string|Expression|Closure $column,
124
+        string | Expression | Closure $column,
125 125
         ?string $alias = null,
126 126
         bool $distinct = false
127 127
     ): self {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      * @return $this
136 136
      */
137 137
     public function sum(
138
-        string|Expression|Closure $column,
138
+        string | Expression | Closure $column,
139 139
         ?string $alias = null,
140 140
         bool $distinct = false
141 141
     ): self {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      * @return $this
150 150
      */
151 151
     public function min(
152
-        string|Expression|Closure $column,
152
+        string | Expression | Closure $column,
153 153
         ?string $alias = null,
154 154
         bool $distinct = false
155 155
     ): self {
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      * @return $this
164 164
      */
165 165
     public function max(
166
-        string|Expression|Closure $column,
166
+        string | Expression | Closure $column,
167 167
         ?string $alias = null,
168 168
         bool $distinct = false
169 169
     ): self {
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,14 +52,12 @@
 block discarded – undo
52 52
  * @class ColumnExpression
53 53
  * @package Platine\Database\Query
54 54
  */
55
-class ColumnExpression
56
-{
55
+class ColumnExpression {
57 56
     /**
58 57
      * ColumnExpression constructor.
59 58
      * @param QueryStatement $queryStatement
60 59
      */
61
-    public function __construct(protected QueryStatement $queryStatement)
62
-    {
60
+    public function __construct(protected QueryStatement $queryStatement) {
63 61
     }
64 62
 
65 63
     /**
Please login to merge, or discard this patch.
src/Query/Select.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function __construct(
71 71
         Connection $connection,
72
-        string|array $tables,
72
+        string | array $tables,
73 73
         ?QueryStatement $queryStatement = null
74 74
     ) {
75 75
         parent::__construct($tables, $queryStatement);
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * @return ResultSet
83 83
      */
84
-    public function select(string|Expression|Closure|array $columns = []): ResultSet
84
+    public function select(string | Expression | Closure | array $columns = []): ResultSet
85 85
     {
86 86
         parent::select($columns);
87 87
         $driver = $this->connection->getDriver();
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      *
98 98
      * @return mixed
99 99
      */
100
-    public function column(string|Expression|Closure $name): mixed
100
+    public function column(string | Expression | Closure $name): mixed
101 101
     {
102 102
         parent::column($name);
103 103
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @return int
112 112
      */
113 113
     public function count(
114
-        string|Expression|Closure $column = '*',
114
+        string | Expression | Closure $column = '*',
115 115
         bool $distinct = false
116 116
     ): int {
117 117
         parent::count($column, $distinct);
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
      * @return int|float
126 126
      */
127 127
     public function avg(
128
-        string|Expression|Closure $column,
128
+        string | Expression | Closure $column,
129 129
         bool $distinct = false
130
-    ): int|float {
130
+    ): int | float {
131 131
         parent::avg($column, $distinct);
132 132
         return $this->getColumnResult();
133 133
     }
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
      * @return int|float
140 140
      */
141 141
     public function sum(
142
-        string|Expression|Closure $column,
142
+        string | Expression | Closure $column,
143 143
         bool $distinct = false
144
-    ): int|float {
144
+    ): int | float {
145 145
         parent::sum($column, $distinct);
146 146
         return $this->getColumnResult();
147 147
     }
@@ -153,9 +153,9 @@  discard block
 block discarded – undo
153 153
      * @return int|float
154 154
      */
155 155
     public function min(
156
-        string|Expression|Closure $column,
156
+        string | Expression | Closure $column,
157 157
         bool $distinct = false
158
-    ): int|float {
158
+    ): int | float {
159 159
         parent::min($column, $distinct);
160 160
         return $this->getColumnResult();
161 161
     }
@@ -167,9 +167,9 @@  discard block
 block discarded – undo
167 167
      * @return int|float
168 168
      */
169 169
     public function max(
170
-        string|Expression|Closure $column,
170
+        string | Expression | Closure $column,
171 171
         bool $distinct = false
172
-    ): int|float {
172
+    ): int | float {
173 173
         parent::max($column, $distinct);
174 174
         return $this->getColumnResult();
175 175
     }
Please login to merge, or discard this patch.
src/Query/InsertStatement.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 InsertStatement
51 51
  * @package Platine\Database\Query
52 52
  */
53
-class InsertStatement
54
-{
53
+class InsertStatement {
55 54
     /**
56 55
      * The Query statement instance
57 56
      * @var QueryStatement
@@ -62,8 +61,7 @@  discard block
 block discarded – undo
62 61
      * InsertStatement constructor.
63 62
      * @param QueryStatement|null $queryStatement
64 63
      */
65
-    public function __construct(?QueryStatement $queryStatement = null)
66
-    {
64
+    public function __construct(?QueryStatement $queryStatement = null) {
67 65
         $this->queryStatement = $queryStatement ?? new QueryStatement();
68 66
     }
69 67
 
Please login to merge, or discard this patch.
src/Query/Having.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 Having
53 53
  * @package Platine\Database\Query
54 54
  */
55
-class Having
56
-{
55
+class Having {
57 56
     /**
58 57
      * @var string|Expression
59 58
      */
@@ -68,8 +67,7 @@  discard block
 block discarded – undo
68 67
      * Having constructor.
69 68
      * @param QueryStatement $queryStatement
70 69
      */
71
-    public function __construct(protected QueryStatement $queryStatement)
72
-    {
70
+    public function __construct(protected QueryStatement $queryStatement) {
73 71
     }
74 72
 
75 73
     /**
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
@@ -36,6 +36,5 @@
 block discarded – undo
36 36
  * @class ConnectionNotFoundException
37 37
  * @package Platine\Database\Exception
38 38
  */
39
-class ConnectionNotFoundException extends DatabaseException
40
-{
39
+class ConnectionNotFoundException extends DatabaseException {
41 40
 }
Please login to merge, or discard this patch.
src/QueryBuilder.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
  * @class QueryBuilder
56 56
  * @package Platine\Database
57 57
  */
58
-class QueryBuilder
59
-{
58
+class QueryBuilder {
60 59
     /**
61 60
      * The Schema instance
62 61
      * @var Schema
@@ -67,8 +66,7 @@  discard block
 block discarded – undo
67 66
      * Class constructor
68 67
      * @param Connection $connection
69 68
      */
70
-    public function __construct(protected Connection $connection)
71
-    {
69
+    public function __construct(protected Connection $connection) {
72 70
         $this->schema = $this->connection->getSchema();
73 71
     }
74 72
 
Please login to merge, or discard this patch.