GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Pull Request — master (#53)
by Alessandro
02:05
created
src/Mado/QueryBundle/Queries/QueryBuilderFactory.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
         $needle = $prevEntityAlias . "_" . $currentEntityAlias;
104 104
 
105
-        return ! in_array($needle, $this->joins);
105
+        return !in_array($needle, $this->joins);
106 106
     }
107 107
 
108 108
     private function storeJoin($prevEntityAlias, $currentEntityAlias)
@@ -208,13 +208,13 @@  discard block
 block discarded – undo
208 208
     private function applyFilterAnd($filter, $value)
209 209
     {
210 210
         $whereCondition = null;
211
-        $filterAndOperator = explode('|',$filter);
211
+        $filterAndOperator = explode('|', $filter);
212 212
 
213 213
         $fieldName = $filterAndOperator[0];
214 214
         $fieldName = $this->parser->camelize($fieldName);
215 215
 
216 216
         $operator = $this->getAvailableFilters()[self::DEFAULT_OPERATOR];
217
-        if(isset($filterAndOperator[1])){
217
+        if (isset($filterAndOperator[1])) {
218 218
             $operator = $this->getAvailableFilters()[$filterAndOperator[1]];
219 219
         }
220 220
 
@@ -234,10 +234,10 @@  discard block
 block discarded – undo
234 234
             // $filterAndOperator[1] = 'bar'
235 235
             if (isset($filterAndOperator[1])) {
236 236
                 if ('list' == $filterAndOperator[1]) {
237
-                    $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' (:field_'.$fieldName . $salt . ')';
237
+                    $whereCondition = $this->entityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' (:field_' . $fieldName . $salt . ')';
238 238
                 } else if ('field_eq' == $filterAndOperator[1]) {
239 239
                     $whereCondition =
240
-                        $this->entityAlias . '.' . $fieldName . ' '.
240
+                        $this->entityAlias . '.' . $fieldName . ' ' .
241 241
                         $operator['meta'] . '' .
242 242
                         $this->entityAlias . '.' . $value
243 243
                         ;
@@ -246,10 +246,10 @@  discard block
 block discarded – undo
246 246
                     //'Oops! Eccezzione'
247 247
                     //);
248 248
                 } else {
249
-                    $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' :field_'.$fieldName . $salt;
249
+                    $whereCondition = $this->entityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' :field_' . $fieldName . $salt;
250 250
                 }
251 251
             } else {
252
-                $whereCondition = $this->entityAlias.'.'.$fieldName.' = :field_'.$fieldName . $salt;
252
+                $whereCondition = $this->entityAlias . '.' . $fieldName . ' = :field_' . $fieldName . $salt;
253 253
             }
254 254
 
255 255
             $this->qBuilder->andWhere($whereCondition);
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         } else {
271 271
             $isNotARelation = 0 !== strpos($fieldName, 'Embedded.');
272 272
             if ($isNotARelation) {
273
-                $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' ' . $this->entityAlias . '.' . $value;
273
+                $whereCondition = $this->entityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' ' . $this->entityAlias . '.' . $value;
274 274
                 $this->qBuilder->andWhere($whereCondition);
275 275
             }
276 276
         }
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
             $relationEntityAlias = $this->getRelationEntityAlias();
284 284
 
285 285
             $embeddedFields = explode('.', $fieldName);
286
-            $fieldName = $this->parser->camelize($embeddedFields[count($embeddedFields)-1]);
286
+            $fieldName = $this->parser->camelize($embeddedFields[count($embeddedFields) - 1]);
287 287
 
288 288
             $salt = '';
289 289
             foreach ($this->qBuilder->getParameters() as $parameter) {
@@ -293,9 +293,9 @@  discard block
 block discarded – undo
293 293
             }
294 294
 
295 295
             if (isset($filterAndOperator[1]) && 'list' == $filterAndOperator[1]) {
296
-                $whereCondition = $relationEntityAlias.'.'.$fieldName.' '.$operator['meta'].' (:field_'.$fieldName . $salt . ')';
296
+                $whereCondition = $relationEntityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' (:field_' . $fieldName . $salt . ')';
297 297
             } else {
298
-                $whereCondition = $relationEntityAlias.'.'.$fieldName.' '.$operator['meta'].' :field_'.$fieldName . $salt;
298
+                $whereCondition = $relationEntityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' :field_' . $fieldName . $salt;
299 299
             }
300 300
 
301 301
             $this->qBuilder->andWhere($whereCondition);
@@ -318,13 +318,13 @@  discard block
 block discarded – undo
318 318
     private function applyFilterOr($filter, $value, $orCondition)
319 319
     {
320 320
         $whereCondition = null;
321
-        $filterAndOperator = explode('|',$filter);
321
+        $filterAndOperator = explode('|', $filter);
322 322
 
323 323
         $fieldName = $filterAndOperator[0];
324 324
         $fieldName = $this->parser->camelize($fieldName);
325 325
 
326 326
         $operator = $this->getAvailableFilters()[self::DEFAULT_OPERATOR];
327
-        if(isset($filterAndOperator[1])){
327
+        if (isset($filterAndOperator[1])) {
328 328
             $operator = $this->getAvailableFilters()[$filterAndOperator[1]];
329 329
         }
330 330
 
@@ -348,10 +348,10 @@  discard block
 block discarded – undo
348 348
             // $filterAndOperator[1] = 'bar'
349 349
             if (isset($filterAndOperator[1])) {
350 350
                 if ('list' == $filterAndOperator[1]) {
351
-                    $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' (:field_'.$fieldName . $salt . ')';
351
+                    $whereCondition = $this->entityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' (:field_' . $fieldName . $salt . ')';
352 352
                 } else if ('field_eq' == $filterAndOperator[1]) {
353 353
                     $whereCondition =
354
-                        $this->entityAlias . '.' . $fieldName . ' '.
354
+                        $this->entityAlias . '.' . $fieldName . ' ' .
355 355
                         $operator['meta'] . '' .
356 356
                         $this->entityAlias . '.' . $value
357 357
                     ;
@@ -360,10 +360,10 @@  discard block
 block discarded – undo
360 360
                     //'Oops! Eccezzione'
361 361
                     //);
362 362
                 } else {
363
-                    $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' :field_'.$fieldName . $salt;
363
+                    $whereCondition = $this->entityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' :field_' . $fieldName . $salt;
364 364
                 }
365 365
             } else {
366
-                $whereCondition = $this->entityAlias.'.'.$fieldName.' = :field_'.$fieldName . $salt;
366
+                $whereCondition = $this->entityAlias . '.' . $fieldName . ' = :field_' . $fieldName . $salt;
367 367
             }
368 368
 
369 369
             if ($orCondition['orCondition'] != null) {
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
         } else {
392 392
             $isNotARelation = 0 !== strpos($fieldName, 'Embedded.');
393 393
             if ($isNotARelation) {
394
-                $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' ' . $this->entityAlias . '.' . $value;
394
+                $whereCondition = $this->entityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' ' . $this->entityAlias . '.' . $value;
395 395
                 if ($orCondition['orCondition'] != null) {
396 396
                     $orCondition['orCondition'] .= ' OR ' . $whereCondition;
397 397
                 } else {
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
             $relationEntityAlias = $this->getRelationEntityAlias();
409 409
 
410 410
             $embeddedFields = explode('.', $fieldName);
411
-            $fieldName = $this->parser->camelize($embeddedFields[count($embeddedFields)-1]);
411
+            $fieldName = $this->parser->camelize($embeddedFields[count($embeddedFields) - 1]);
412 412
 
413 413
             $salt = '';
414 414
             foreach ($this->qBuilder->getParameters() as $parameter) {
@@ -422,9 +422,9 @@  discard block
 block discarded – undo
422 422
             }
423 423
 
424 424
             if (isset($filterAndOperator[1]) && 'list' == $filterAndOperator[1]) {
425
-                $whereCondition = $relationEntityAlias.'.'.$fieldName.' '.$operator['meta'].' (:field_'.$fieldName . $salt . ')';
425
+                $whereCondition = $relationEntityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' (:field_' . $fieldName . $salt . ')';
426 426
             } else {
427
-                $whereCondition = $relationEntityAlias.'.'.$fieldName.' '.$operator['meta'].' :field_'.$fieldName . $salt;
427
+                $whereCondition = $relationEntityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' :field_' . $fieldName . $salt;
428 428
             }
429 429
 
430 430
             if ($orCondition['orCondition'] != null) {
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 
476 476
             if (in_array($fieldName, $this->fields)) {
477 477
                 $direction = ($val === self::DIRECTION_AZ) ? self::DIRECTION_AZ : self::DIRECTION_ZA;
478
-                $this->qBuilder->addOrderBy($this->entityAlias .'.'. $fieldName, $direction);
478
+                $this->qBuilder->addOrderBy($this->entityAlias . '.' . $fieldName, $direction);
479 479
             }
480 480
 
481 481
             if (strstr($sort, '_embedded.')) {
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
                 $fieldName = $this->parser->camelize($embeddedFields[2]);
487 487
                 $direction = ($val === self::DIRECTION_AZ) ? self::DIRECTION_AZ : self::DIRECTION_ZA;
488 488
 
489
-                $this->qBuilder->addOrderBy($relationEntityAlias.'.'.$fieldName, $direction);
489
+                $this->qBuilder->addOrderBy($relationEntityAlias . '.' . $fieldName, $direction);
490 490
             }
491 491
 
492 492
         }
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
         return $this->pageLength;
575 575
     }
576 576
 
577
-    public function setSelect( $select) : QueryBuilderFactory
577
+    public function setSelect($select) : QueryBuilderFactory
578 578
     {
579 579
         $this->select = $select;
580 580
 
Please login to merge, or discard this patch.