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
Push — master ( dcf075...a4d425 )
by Simone
02:35 queued 11s
created
src/Mado/QueryBundle/DependencyInjection/MadoQueryExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         $configuration = new Configuration();
23 23
         $config = $this->processConfiguration($configuration, $configs);
24 24
 
25
-        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
25
+        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
26 26
         $loader->load('services.yml');
27 27
     }
28 28
 }
Please login to merge, or discard this patch.
tests/Mado/QueryBundle/Objects/QueryBuilderFactoryTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
             'path' => __DIR__ . '/../../data/db.sqlite',
16 16
         ),
17 17
         \Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration(
18
-            array(__DIR__."/src"),
18
+            array(__DIR__ . "/src"),
19 19
             true
20 20
         ));
21 21
     }
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
     public function testProvideOneSingleResult()
24 24
     {
25 25
         $queryBuilderFactory = new QueryBuilderFactory($this->manager);
26
-        $queryBuilderFactory->setFields([ 'id' ]);
27
-        $queryBuilderFactory->setFilters([ 'id|eq' => 33 ]);
26
+        $queryBuilderFactory->setFields(['id']);
27
+        $queryBuilderFactory->setFilters(['id|eq' => 33]);
28 28
         $queryBuilderFactory->createQueryBuilder(MySimpleEntity::class, 'e');
29 29
         $queryBuilderFactory->filter();
30 30
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
     public function testSampleQueryMakedWithQueryBuilderFactory()
41 41
     {
42 42
         $queryBuilderFactory = new QueryBuilderFactory($this->manager);
43
-        $queryBuilderFactory->setFields([ 'id' ]);
44
-        $queryBuilderFactory->setFilters([ 'id|eq' => 33 ]);
43
+        $queryBuilderFactory->setFields(['id']);
44
+        $queryBuilderFactory->setFilters(['id|eq' => 33]);
45 45
         $queryBuilderFactory->createQueryBuilder(MySimpleEntity::class, 'e');
46 46
         $queryBuilderFactory->filter();
47 47
 
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
     public function testOneToManyQueryMakedHandly()
60 60
     {
61 61
         $queryBuilderFactory = new QueryBuilderFactory($this->manager);
62
-        $queryBuilderFactory->setFields([ 'id' ]);
63
-        $queryBuilderFactory->setRel([ 'group' ]);
62
+        $queryBuilderFactory->setFields(['id']);
63
+        $queryBuilderFactory->setRel(['group']);
64 64
         $queryBuilderFactory->setFilters([
65 65
             '_embedded.group.name|contains|1' => 'ad',
66 66
             '_embedded.group.name|contains|2' => 'ns',
Please login to merge, or discard this patch.
src/Mado/QueryBundle/Repositories/BaseRepository.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 
40 40
         $this->fields = array_keys($this->getClassMetadata()->fieldMappings);
41 41
 
42
-        $entityName = explode('\\', strtolower($this->getEntityName()) );
43
-        $entityName = $entityName[count($entityName)-1];
42
+        $entityName = explode('\\', strtolower($this->getEntityName()));
43
+        $entityName = $entityName[count($entityName) - 1];
44 44
         $entityAlias = $entityName[0];
45 45
         $this->entityAlias = $entityAlias;
46 46
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         foreach ($orFilters as $key => $filter) {
123 123
             if (is_array($filter)) {
124 124
                 foreach ($filter as $keyInternal => $internal) {
125
-                    $filterOrCorrected[$keyInternal .'|' . $count] = $internal;
125
+                    $filterOrCorrected[$keyInternal . '|' . $count] = $internal;
126 126
                     $count = $count + 1;
127 127
                 }
128 128
             } else {
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         foreach ($orFilters as $key => $filter) {
175 175
             if (is_array($filter)) {
176 176
                 foreach ($filter as $keyInternal => $internal) {
177
-                    $filterOrCorrected[$keyInternal .'|' . $count] = $internal;
177
+                    $filterOrCorrected[$keyInternal . '|' . $count] = $internal;
178 178
                     $count = $count + 1;
179 179
                 }
180 180
             } else {
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         foreach ($orFilters as $key => $filter) {
222 222
             if (is_array($filter)) {
223 223
                 foreach ($filter as $keyInternal => $internal) {
224
-                    $filterOrCorrected[$keyInternal .'|' . $count] = $internal;
224
+                    $filterOrCorrected[$keyInternal . '|' . $count] = $internal;
225 225
                     $count = $count + 1;
226 226
                 }
227 227
             } else {
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         $pagerAdapter = new DoctrineORMAdapter($queryBuilder);
279 279
 
280 280
         $query = $pagerAdapter->getQuery();
281
-        if(isset($this->use_result_cache) and $this->use_result_cache){
281
+        if (isset($this->use_result_cache) and $this->use_result_cache) {
282 282
             $query->useResultCache(true, 600);
283 283
         }
284 284
 
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
             $params[$itemValue] = $this->queryOptions->get($itemValue);
318 318
         }
319 319
 
320
-        if(!isset($this->route_name)){
320
+        if (!isset($this->route_name)) {
321 321
             $this->route_name = $this->queryOptions->get('_route');
322 322
         }
323 323
 
@@ -346,8 +346,8 @@  discard block
 block discarded – undo
346 346
 
347 347
     public function getEntityAlias(string $entityName) : string
348 348
     {
349
-        $arrayEntityName = explode('\\', strtolower($entityName) );
350
-        return $arrayEntityName[count($arrayEntityName)-1];
349
+        $arrayEntityName = explode('\\', strtolower($entityName));
350
+        return $arrayEntityName[count($arrayEntityName) - 1];
351 351
     }
352 352
 
353 353
     protected function relationship($queryBuilder)
Please login to merge, or discard this patch.
tests/Mado/QueryBundle/Component/Meta/MapBuilderTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
             ->getMock();
48 48
         $this->factory->expects($this->once())
49 49
             ->method('getAllMetadata')
50
-            ->will($this->returnValue(function () {
50
+            ->will($this->returnValue(function() {
51 51
                 return [
52 52
                     'SomeBundle\Entity\ParentEntity' => [
53 53
                         'relations' => [
Please login to merge, or discard this patch.
src/Mado/QueryBundle/Component/Meta/JsonPathFinder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $this->mapper = $mapper;
47 47
         $this->logger = $logger;
48 48
 
49
-        $this->appendRootEntityToSubject =  function($subject, $rootEntity) {
49
+        $this->appendRootEntityToSubject = function($subject, $rootEntity) {
50 50
             $subject[] = $rootEntity;
51 51
             return $subject;
52 52
         };
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
                 $entities = $this->getEntitiesPath();
277 277
                 $lastEntityFound = end($entities);
278 278
                 $this->removeStep($lastEntityFound);
279
-            } catch(\Mado\QueryBundle\Component\Meta\Exceptions\UnexpectedValueException $e) {
279
+            } catch (\Mado\QueryBundle\Component\Meta\Exceptions\UnexpectedValueException $e) {
280 280
                 return;
281 281
             }
282 282
         }
Please login to merge, or discard this patch.
src/Mado/QueryBundle/Queries/QueryBuilderFactory.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
         $needle = $prevEntityAlias . "_" . $currentEntityAlias;
106 106
 
107
-        return ! in_array($needle, $this->joins);
107
+        return !in_array($needle, $this->joins);
108 108
     }
109 109
 
110 110
     private function storeJoin($prevEntityAlias, $currentEntityAlias)
@@ -215,13 +215,13 @@  discard block
 block discarded – undo
215 215
         Objects\Value $filterValue
216 216
     ) {
217 217
         $whereCondition = null;
218
-        $filterAndOperator = explode('|',$filter);
218
+        $filterAndOperator = explode('|', $filter);
219 219
 
220 220
         $fieldName = $filterAndOperator[0];
221 221
         $fieldName = $this->parser->camelize($fieldName);
222 222
 
223 223
         $operator = $this->getValueAvailableFilters()[self::DEFAULT_OPERATOR];
224
-        if(isset($filterAndOperator[1])){
224
+        if (isset($filterAndOperator[1])) {
225 225
             $operator = $this->getValueAvailableFilters()[$filterAndOperator[1]];
226 226
         }
227 227
 
@@ -241,10 +241,10 @@  discard block
 block discarded – undo
241 241
             // $filterAndOperator[1] = 'bar'
242 242
             if (isset($filterAndOperator[1])) {
243 243
                 if ('list' == $filterAndOperator[1]) {
244
-                    $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' (:field_'.$fieldName . $salt . ')';
244
+                    $whereCondition = $this->entityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' (:field_' . $fieldName . $salt . ')';
245 245
                 } else if ('field_eq' == $filterAndOperator[1]) {
246 246
                     $whereCondition =
247
-                        $this->entityAlias . '.' . $fieldName . ' '.
247
+                        $this->entityAlias . '.' . $fieldName . ' ' .
248 248
                         $operator['meta'] . '' .
249 249
                         $this->entityAlias . '.' . $value
250 250
                         ;
@@ -253,10 +253,10 @@  discard block
 block discarded – undo
253 253
                     //'Oops! Eccezzione'
254 254
                     //);
255 255
                 } else {
256
-                    $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' :field_'.$fieldName . $salt;
256
+                    $whereCondition = $this->entityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' :field_' . $fieldName . $salt;
257 257
                 }
258 258
             } else {
259
-                $whereCondition = $this->entityAlias.'.'.$fieldName.' = :field_'.$fieldName . $salt;
259
+                $whereCondition = $this->entityAlias . '.' . $fieldName . ' = :field_' . $fieldName . $salt;
260 260
             }
261 261
 
262 262
             $this->qBuilder->andWhere($whereCondition);
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
         } else {
278 278
             $isNotARelation = 0 !== strpos($fieldName, 'Embedded.');
279 279
             if ($isNotARelation) {
280
-                $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' ' . $this->entityAlias . '.' . $value;
280
+                $whereCondition = $this->entityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' ' . $this->entityAlias . '.' . $value;
281 281
                 $this->qBuilder->andWhere($whereCondition);
282 282
             }
283 283
         }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
             $relationEntityAlias = $this->getRelationEntityAlias();
291 291
 
292 292
             $embeddedFields = explode('.', $fieldName);
293
-            $fieldName = $this->parser->camelize($embeddedFields[count($embeddedFields)-1]);
293
+            $fieldName = $this->parser->camelize($embeddedFields[count($embeddedFields) - 1]);
294 294
 
295 295
             $salt = '';
296 296
             foreach ($this->qBuilder->getParameters() as $parameter) {
@@ -300,9 +300,9 @@  discard block
 block discarded – undo
300 300
             }
301 301
 
302 302
             if (isset($filterAndOperator[1]) && 'list' == $filterAndOperator[1]) {
303
-                $whereCondition = $relationEntityAlias.'.'.$fieldName.' '.$operator['meta'].' (:field_'.$fieldName . $salt . ')';
303
+                $whereCondition = $relationEntityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' (:field_' . $fieldName . $salt . ')';
304 304
             } else {
305
-                $whereCondition = $relationEntityAlias.'.'.$fieldName.' '.$operator['meta'].' :field_'.$fieldName . $salt;
305
+                $whereCondition = $relationEntityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' :field_' . $fieldName . $salt;
306 306
             }
307 307
 
308 308
             $this->qBuilder->andWhere($whereCondition);
@@ -325,13 +325,13 @@  discard block
 block discarded – undo
325 325
     private function applyFilterOr($filter, $value, $orCondition)
326 326
     {
327 327
         $whereCondition = null;
328
-        $filterAndOperator = explode('|',$filter);
328
+        $filterAndOperator = explode('|', $filter);
329 329
 
330 330
         $fieldName = $filterAndOperator[0];
331 331
         $fieldName = $this->parser->camelize($fieldName);
332 332
 
333 333
         $operator = $this->getValueAvailableFilters()[self::DEFAULT_OPERATOR];
334
-        if(isset($filterAndOperator[1])){
334
+        if (isset($filterAndOperator[1])) {
335 335
             $operator = $this->getValueAvailableFilters()[$filterAndOperator[1]];
336 336
         }
337 337
 
@@ -355,10 +355,10 @@  discard block
 block discarded – undo
355 355
             // $filterAndOperator[1] = 'bar'
356 356
             if (isset($filterAndOperator[1])) {
357 357
                 if ('list' == $filterAndOperator[1]) {
358
-                    $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' (:field_'.$fieldName . $salt . ')';
358
+                    $whereCondition = $this->entityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' (:field_' . $fieldName . $salt . ')';
359 359
                 } else if ('field_eq' == $filterAndOperator[1]) {
360 360
                     $whereCondition =
361
-                        $this->entityAlias . '.' . $fieldName . ' '.
361
+                        $this->entityAlias . '.' . $fieldName . ' ' .
362 362
                         $operator['meta'] . '' .
363 363
                         $this->entityAlias . '.' . $value
364 364
                     ;
@@ -367,10 +367,10 @@  discard block
 block discarded – undo
367 367
                     //'Oops! Eccezzione'
368 368
                     //);
369 369
                 } else {
370
-                    $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' :field_'.$fieldName . $salt;
370
+                    $whereCondition = $this->entityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' :field_' . $fieldName . $salt;
371 371
                 }
372 372
             } else {
373
-                $whereCondition = $this->entityAlias.'.'.$fieldName.' = :field_'.$fieldName . $salt;
373
+                $whereCondition = $this->entityAlias . '.' . $fieldName . ' = :field_' . $fieldName . $salt;
374 374
             }
375 375
 
376 376
             if ($orCondition['orCondition'] != null) {
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
         } else {
399 399
             $isNotARelation = 0 !== strpos($fieldName, 'Embedded.');
400 400
             if ($isNotARelation) {
401
-                $whereCondition = $this->entityAlias.'.'.$fieldName.' '.$operator['meta'].' ' . $this->entityAlias . '.' . $value;
401
+                $whereCondition = $this->entityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' ' . $this->entityAlias . '.' . $value;
402 402
                 if ($orCondition['orCondition'] != null) {
403 403
                     $orCondition['orCondition'] .= ' OR ' . $whereCondition;
404 404
                 } else {
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
             $relationEntityAlias = $this->getRelationEntityAlias();
416 416
 
417 417
             $embeddedFields = explode('.', $fieldName);
418
-            $fieldName = $this->parser->camelize($embeddedFields[count($embeddedFields)-1]);
418
+            $fieldName = $this->parser->camelize($embeddedFields[count($embeddedFields) - 1]);
419 419
 
420 420
             $salt = '';
421 421
             foreach ($this->qBuilder->getParameters() as $parameter) {
@@ -429,9 +429,9 @@  discard block
 block discarded – undo
429 429
             }
430 430
 
431 431
             if (isset($filterAndOperator[1]) && 'list' == $filterAndOperator[1]) {
432
-                $whereCondition = $relationEntityAlias.'.'.$fieldName.' '.$operator['meta'].' (:field_'.$fieldName . $salt . ')';
432
+                $whereCondition = $relationEntityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' (:field_' . $fieldName . $salt . ')';
433 433
             } else {
434
-                $whereCondition = $relationEntityAlias.'.'.$fieldName.' '.$operator['meta'].' :field_'.$fieldName . $salt;
434
+                $whereCondition = $relationEntityAlias . '.' . $fieldName . ' ' . $operator['meta'] . ' :field_' . $fieldName . $salt;
435 435
             }
436 436
 
437 437
             if ($orCondition['orCondition'] != null) {
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
 
483 483
             if (in_array($fieldName, $this->fields)) {
484 484
                 $direction = ($val === self::DIRECTION_AZ) ? self::DIRECTION_AZ : self::DIRECTION_ZA;
485
-                $this->qBuilder->addOrderBy($this->entityAlias .'.'. $fieldName, $direction);
485
+                $this->qBuilder->addOrderBy($this->entityAlias . '.' . $fieldName, $direction);
486 486
             }
487 487
 
488 488
             if (strstr($sort, '_embedded.')) {
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
                 $fieldName = $this->parser->camelize($embeddedFields[2]);
494 494
                 $direction = ($val === self::DIRECTION_AZ) ? self::DIRECTION_AZ : self::DIRECTION_ZA;
495 495
 
496
-                $this->qBuilder->addOrderBy($relationEntityAlias.'.'.$fieldName, $direction);
496
+                $this->qBuilder->addOrderBy($relationEntityAlias . '.' . $fieldName, $direction);
497 497
             }
498 498
 
499 499
         }
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
         return $this->pageLength;
582 582
     }
583 583
 
584
-    public function setSelect( $select) : QueryBuilderFactory
584
+    public function setSelect($select) : QueryBuilderFactory
585 585
     {
586 586
         $this->select = $select;
587 587
 
Please login to merge, or discard this patch.