Passed
Push — develop ( b67689...ab2dee )
by nguereza
18:30 queued 15:54
created
src/Query/DeleteStatement.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,15 +50,13 @@  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
      * DeleteStatement constructor.
57 56
      * @param string|array<string> $from
58 57
      * @param QueryStatement|null $queryStatement
59 58
      */
60
-    public function __construct($from, QueryStatement $queryStatement = null)
61
-    {
59
+    public function __construct($from, QueryStatement $queryStatement = null) {
62 60
         parent::__construct($queryStatement);
63 61
 
64 62
         if (!is_array($from)) {
@@ -72,8 +70,7 @@  discard block
 block discarded – undo
72 70
      * @param string|array<string> $tables
73 71
      * @return mixed
74 72
      */
75
-    public function delete($tables = [])
76
-    {
73
+    public function delete($tables = []) {
77 74
         if (!is_array($tables)) {
78 75
             /** @var array<string> $tables */
79 76
             $tables = [$tables];
Please login to merge, or discard this patch.
src/Query/WhereStatement.php 1 patch
Braces   +6 added lines, -12 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
         if ($queryStatement === null) {
76 74
             $queryStatement = new QueryStatement();
77 75
         }
@@ -93,8 +91,7 @@  discard block
 block discarded – undo
93 91
      *
94 92
      * @return WhereStatement|Where|Select|Delete|Update
95 93
      */
96
-    public function where($column, bool $isExpression = false)
97
-    {
94
+    public function where($column, bool $isExpression = false) {
98 95
         return $this->addWhereCondition($column, 'AND', $isExpression);
99 96
     }
100 97
 
@@ -104,8 +101,7 @@  discard block
 block discarded – undo
104 101
      *
105 102
      * @return WhereStatement|Where|Select|Delete|Update
106 103
      */
107
-    public function orWhere($column, bool $isExpression = false)
108
-    {
104
+    public function orWhere($column, bool $isExpression = false) {
109 105
         return $this->addWhereCondition($column, 'OR', $isExpression);
110 106
     }
111 107
 
@@ -148,8 +144,7 @@  discard block
 block discarded – undo
148 144
     /**
149 145
      * @inheritDoc
150 146
      */
151
-    public function __clone()
152
-    {
147
+    public function __clone() {
153 148
         $this->queryStatement = clone $this->queryStatement;
154 149
         $this->where = new Where($this, $this->queryStatement);
155 150
     }
@@ -161,8 +156,7 @@  discard block
 block discarded – undo
161 156
      *
162 157
      * @return WhereStatement|Where
163 158
      */
164
-    protected function addWhereCondition($column, string $separator = 'AND', bool $isExpression = false)
165
-    {
159
+    protected function addWhereCondition($column, string $separator = 'AND', bool $isExpression = false) {
166 160
         if (($column instanceof Closure) && !$isExpression) {
167 161
             $this->queryStatement->addWhereGroup($column, $separator);
168 162
 
Please login to merge, or discard this patch.
src/Query/HavingStatement.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@  discard block
 block discarded – undo
52 52
  * @class HavingStatement
53 53
  * @package Platine\Database\Query
54 54
  */
55
-class HavingStatement
56
-{
55
+class HavingStatement {
57 56
     /**
58 57
      * The Query statement instance
59 58
      * @var QueryStatement
@@ -70,8 +69,7 @@  discard block
 block discarded – undo
70 69
      * HavingStatement 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
         if ($queryStatement === null) {
76 74
             $queryStatement = new QueryStatement();
77 75
         }
@@ -110,8 +108,7 @@  discard block
 block discarded – undo
110 108
     /**
111 109
      * @inheritDoc
112 110
      */
113
-    public function __clone()
114
-    {
111
+    public function __clone() {
115 112
         $this->queryStatement = clone $this->queryStatement;
116 113
         $this->expression = new HavingExpression($this->queryStatement);
117 114
     }
Please login to merge, or discard this patch.
src/Query/ColumnExpression.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@  discard block
 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
      * The Query statement instance
59 58
      * @var QueryStatement
@@ -64,8 +63,7 @@  discard block
 block discarded – undo
64 63
      * ColumnExpression constructor.
65 64
      * @param QueryStatement $queryStatement
66 65
      */
67
-    public function __construct(QueryStatement $queryStatement)
68
-    {
66
+    public function __construct(QueryStatement $queryStatement) {
69 67
         $this->queryStatement = $queryStatement;
70 68
     }
71 69
 
@@ -159,8 +157,7 @@  discard block
 block discarded – undo
159 157
         return $this->column((new Expression())->max($column, $distinct), $alias);
160 158
     }
161 159
 
162
-    public function __clone()
163
-    {
160
+    public function __clone() {
164 161
         $this->queryStatement = clone $this->queryStatement;
165 162
     }
166 163
 }
Please login to merge, or discard this patch.
src/Schema/AlterTable.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 AlterTable
51 51
  * @package Platine\Database\Schema
52 52
  */
53
-class AlterTable
54
-{
53
+class AlterTable {
55 54
     /**
56 55
      * The name of table
57 56
      * @var string
@@ -68,8 +67,7 @@  discard block
 block discarded – undo
68 67
      * Class constructor
69 68
      * @param string $table
70 69
      */
71
-    public function __construct(string $table)
72
-    {
70
+    public function __construct(string $table) {
73 71
         $this->table = $table;
74 72
     }
75 73
 
Please login to merge, or discard this patch.
src/Schema/AlterColumn.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 AlterColumn
51 51
  * @package Platine\Database\Schema
52 52
  */
53
-class AlterColumn extends BaseColumn
54
-{
53
+class AlterColumn extends BaseColumn {
55 54
     /**
56 55
      * The alter table
57 56
      * @var AlterTable
@@ -64,8 +63,7 @@  discard block
 block discarded – undo
64 63
      * @param string $name
65 64
      * @param string|null $type
66 65
      */
67
-    public function __construct(AlterTable $table, string $name, ?string $type = null)
68
-    {
66
+    public function __construct(AlterTable $table, string $name, ?string $type = null) {
69 67
         $this->table = $table;
70 68
         parent::__construct($name, $type);
71 69
     }
Please login to merge, or discard this patch.
src/Schema/BaseColumn.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
  * @class BaseColumn
51 51
  * @package Platine\Database\Schema
52 52
  */
53
-class BaseColumn
54
-{
53
+class BaseColumn {
55 54
     /**
56 55
      * The name of the column
57 56
      * @var string
@@ -75,8 +74,7 @@  discard block
 block discarded – undo
75 74
      * @param string $name
76 75
      * @param string|null $type
77 76
      */
78
-    public function __construct(string $name, ?string $type = null)
79
-    {
77
+    public function __construct(string $name, ?string $type = null) {
80 78
         $this->name = $name;
81 79
         $this->type = $type;
82 80
     }
@@ -151,8 +149,7 @@  discard block
 block discarded – undo
151 149
      * @param mixed|null $default
152 150
      * @return mixed
153 151
      */
154
-    public function get(string $name, $default = null)
155
-    {
152
+    public function get(string $name, $default = null) {
156 153
         return isset($this->properties[$name])
157 154
                     ? $this->properties[$name]
158 155
                     : $default;
Please login to merge, or discard this patch.
src/Schema/CreateColumn.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 CreateColumn
51 51
  * @package Platine\Database\Schema
52 52
  */
53
-class CreateColumn extends BaseColumn
54
-{
53
+class CreateColumn extends BaseColumn {
55 54
     /**
56 55
      * The associated table instance
57 56
      * @var CreateTable
@@ -64,8 +63,7 @@  discard block
 block discarded – undo
64 63
      * @param string $name
65 64
      * @param string|null $type
66 65
      */
67
-    public function __construct(CreateTable $table, string $name, ?string $type = null)
68
-    {
66
+    public function __construct(CreateTable $table, string $name, ?string $type = null) {
69 67
         $this->table = $table;
70 68
         parent::__construct($name, $type);
71 69
     }
Please login to merge, or discard this patch.
src/Schema/ForeignKey.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 ForeignKey
51 51
  * @package Platine\Database\Schema
52 52
  */
53
-class ForeignKey
54
-{
53
+class ForeignKey {
55 54
     /**
56 55
      * The referenced table
57 56
      * @var string
@@ -80,8 +79,7 @@  discard block
 block discarded – undo
80 79
      * Class constructor
81 80
      * @param array<int, string> $columns
82 81
      */
83
-    public function __construct(array $columns)
84
-    {
82
+    public function __construct(array $columns) {
85 83
         $this->columns = $columns;
86 84
     }
87 85
 
Please login to merge, or discard this patch.