Passed
Push — dev_2x ( fa57a5...f00e1a )
by Adrian
01:48
created
src/CodeGenerator/MapperBaseGenerator.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
     {
146 146
         $this->namespace->addUse($this->mapper->getEntityNamespace() . '\\' . $this->mapper->getEntityClass());
147 147
         $method = $this->class->addMethod('find')
148
-                              ->setReturnNullable(true)
149
-                              ->setReturnType($this->mapper->getEntityClass());
148
+                                ->setReturnNullable(true)
149
+                                ->setReturnType($this->mapper->getEntityClass());
150 150
         $method->addParameter('pk');
151 151
         $method->addParameter('load', [])->setType('array');
152 152
         $method->setBody('return $this->newQuery()->find($pk, $load);');
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     protected function addNewQueryMethod()
156 156
     {
157 157
         $method = $this->class->addMethod('newQuery')
158
-                              ->setReturnType($this->mapper->getQueryClass());
158
+                                ->setReturnType($this->mapper->getQueryClass());
159 159
         $method->addBody(sprintf('$query = new %s($this->getReadConnection(), $this);', $this->mapper->getQueryClass()));
160 160
         $method->addBody('return $this->behaviours->apply($this, __FUNCTION__, $query);');
161 161
     }
@@ -163,15 +163,15 @@  discard block
 block discarded – undo
163 163
     protected function addNewSubselectQueryMethod()
164 164
     {
165 165
         $method = $this->class->addMethod('newSubselectQuery')
166
-                              ->setReturnType($this->mapper->getQueryClass());
166
+                                ->setReturnType($this->mapper->getQueryClass());
167 167
         $this->class->getNamespace()->addUse(Connection::class, null, $connectionAlias);
168 168
         $method->addParameter('connection')
169
-               ->setType($connectionAlias);
169
+                ->setType($connectionAlias);
170 170
         $this->class->getNamespace()->addUse(Bindings::class, null, $bindingsAlias);
171 171
         $method->addParameter('bindings')
172
-               ->setType($bindingsAlias);
172
+                ->setType($bindingsAlias);
173 173
         $method->addParameter('indent')
174
-               ->setType('string');
174
+                ->setType('string');
175 175
         $method->addBody(sprintf('$query = new %s($this->getReadConnection(), $this, $bindings, $indent);', $this->mapper->getQueryClass()));
176 176
         $method->addBody('return $this->behaviours->apply($this, __FUNCTION__, $query);');
177 177
     }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         $this->namespace->addUse(StateEnum::class);
184 184
 
185 185
         $method = $this->class->addMethod('save')
186
-                              ->setReturnType('bool');
186
+                                ->setReturnType('bool');
187 187
         $method->addParameter('entity')->setType($this->mapper->getEntityClass());
188 188
         $method->addParameter('withRelations', false);
189 189
         $method->setBody('
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
     protected function addDeleteMethod()
222 222
     {
223 223
         $method = $this->class->addMethod('delete')
224
-                              ->setReturnType('bool');
224
+                                ->setReturnType('bool');
225 225
         $method->addParameter('entity')->setType($this->mapper->getEntityClass());
226 226
         $method->addParameter('withRelations', false);
227 227
         $method->setBody('
Please login to merge, or discard this patch.
src/Action/AttachEntities.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,8 +115,8 @@
 block discarded – undo
115 115
 
116 116
         $insert = new \Sirius\Sql\Insert($conn);
117 117
         $insert->into($pivotTable)
118
-               ->columns($insertColumns)
119
-               ->perform();
118
+                ->columns($insertColumns)
119
+                ->perform();
120 120
     }
121 121
 
122 122
     protected function getNativeEntityHydrator()
Please login to merge, or discard this patch.
src/Relation/ManyToMany.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $query = $this->foreignMapper->newQuery();
62 62
 
63 63
         $query = $this->joinWithPivotTable($query)
64
-                      ->where($this->options[RelationConfig::PIVOT_NATIVE_COLUMN], $nativePks);
64
+                        ->where($this->options[RelationConfig::PIVOT_NATIVE_COLUMN], $nativePks);
65 65
 
66 66
         $query = $this->applyQueryCallback($query);
67 67
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     {
116 116
         $subselect = $this->foreignMapper->newQuery();
117 117
         $subselect = $query->subSelectForJoinWith($this->foreignMapper)
118
-                           ->as($reference);
118
+                            ->as($reference);
119 119
         #$subselect->resetGuards();
120 120
         #$subselect->setGuards($this->foreignMapper->getConfig()->getGuards());
121 121
 
Please login to merge, or discard this patch.