Passed
Push — dev_2x ( d7ecbe...3e8772 )
by Adrian
01:43
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,17 +163,17 @@  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
         /** @scrutinizer ignore-deprecated */ $this->class->getNamespace()->addUse(Connection::class, null, $connectionAlias);
168 168
         $method->addParameter('connection')
169
-               ->setType($connectionAlias);
169
+                ->setType($connectionAlias);
170 170
 
171 171
         /** @scrutinizer ignore-deprecated */ $this->class->getNamespace()->addUse(Bindings::class, null, $bindingsAlias);
172 172
         $method->addParameter('bindings')
173
-               ->setType($bindingsAlias);
173
+                ->setType($bindingsAlias);
174 174
 
175 175
         $method->addParameter('indent')
176
-               ->setType('string');
176
+                ->setType('string');
177 177
 
178 178
         $method->addBody(sprintf('$query = new %s($this->getReadConnection(), $this, $bindings, $indent);', $this->mapper->getQueryClass()));
179 179
         $method->addBody('return $this->behaviours->apply($this, __FUNCTION__, $query);');
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         $this->namespace->addUse(StateEnum::class);
187 187
 
188 188
         $method = $this->class->addMethod('save')
189
-                              ->setReturnType('bool');
189
+                                ->setReturnType('bool');
190 190
         $method->addParameter('entity')->setType($this->mapper->getEntityClass());
191 191
         $method->addParameter('withRelations', false);
192 192
         $method->setBody('
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     protected function addDeleteMethod()
225 225
     {
226 226
         $method = $this->class->addMethod('delete')
227
-                              ->setReturnType('bool');
227
+                                ->setReturnType('bool');
228 228
         $method->addParameter('entity')->setType($this->mapper->getEntityClass());
229 229
         $method->addParameter('withRelations', false);
230 230
         $method->setBody('
Please login to merge, or discard this patch.