Passed
Push — master ( ba7d8d...e67af9 )
by Luiz Kim
02:11
created
src/Repository/AddressRepository.php 3 patches
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -22,65 +22,65 @@
 block discarded – undo
22 22
 
23 23
     public function findOneByCityStateCountryOfPeople(string $city, string $state, string $country, People $people): ?Address
24 24
     {
25
-      $result = $this->createQueryBuilder('a')
26
-                  ->innerJoin         ('a.street'  , 's')
27
-                  ->innerJoin         ('s.district', 'd')
28
-                  ->innerJoin         ('d.city'    , 'c')
29
-                  ->innerJoin         ('c.state'   , 'e')
30
-                  ->innerJoin         ('e.country' , 'u')
25
+        $result = $this->createQueryBuilder('a')
26
+                    ->innerJoin         ('a.street'  , 's')
27
+                    ->innerJoin         ('s.district', 'd')
28
+                    ->innerJoin         ('d.city'    , 'c')
29
+                    ->innerJoin         ('c.state'   , 'e')
30
+                    ->innerJoin         ('e.country' , 'u')
31 31
 
32
-                  ->andWhere          ('c.city        = :city'   )
33
-                  ->andWhere          ('e.uf          = :state'  )
34
-                  ->andWhere          ('u.countryname = :country')
35
-                  ->andWhere          ('a.people      = :people' )
32
+                    ->andWhere          ('c.city        = :city'   )
33
+                    ->andWhere          ('e.uf          = :state'  )
34
+                    ->andWhere          ('u.countryname = :country')
35
+                    ->andWhere          ('a.people      = :people' )
36 36
 
37
-                  ->setParameter      ('city'   , $city   )
38
-                  ->setParameter      ('state'  , $state  )
39
-                  ->setParameter      ('country', $country)
40
-                  ->setParameter      ('people' , $people)
37
+                    ->setParameter      ('city'   , $city   )
38
+                    ->setParameter      ('state'  , $state  )
39
+                    ->setParameter      ('country', $country)
40
+                    ->setParameter      ('people' , $people)
41 41
 
42
-                  ->getQuery()
43
-                  ->getResult()
44
-              ;
42
+                    ->getQuery()
43
+                    ->getResult()
44
+                ;
45 45
 
46
-      if (empty($result))
46
+        if (empty($result))
47 47
         return null;
48 48
 
49
-      return $result[0];
49
+        return $result[0];
50 50
     }
51 51
 
52 52
     public function findPeopleAddressBy(People $people, array $criteria): ?Address
53 53
     {
54
-      $result = $this->createQueryBuilder('a')
55
-                  ->innerJoin         ('a.street'  , 's')
56
-                  ->innerJoin         ('s.district', 'd')
57
-                  ->innerJoin         ('d.city'    , 'c')
58
-                  ->innerJoin         ('c.state'   , 'e')
59
-                  ->innerJoin         ('e.country' , 'u')
54
+        $result = $this->createQueryBuilder('a')
55
+                    ->innerJoin         ('a.street'  , 's')
56
+                    ->innerJoin         ('s.district', 'd')
57
+                    ->innerJoin         ('d.city'    , 'c')
58
+                    ->innerJoin         ('c.state'   , 'e')
59
+                    ->innerJoin         ('e.country' , 'u')
60 60
 
61
-                  ->andWhere          ('a.people      = :people'  )
62
-                  ->andWhere          ('u.countryname = :country' )
63
-                  ->andWhere          ('(e.uf = :state OR e.state = :state)')
64
-                  ->andWhere          ('c.city        = :city'    )
65
-                  ->andWhere          ('d.district    = :district')
66
-                  ->andWhere          ('s.street      = :street'  )
67
-                  ->andWhere          ('a.number      = :number'  )
61
+                    ->andWhere          ('a.people      = :people'  )
62
+                    ->andWhere          ('u.countryname = :country' )
63
+                    ->andWhere          ('(e.uf = :state OR e.state = :state)')
64
+                    ->andWhere          ('c.city        = :city'    )
65
+                    ->andWhere          ('d.district    = :district')
66
+                    ->andWhere          ('s.street      = :street'  )
67
+                    ->andWhere          ('a.number      = :number'  )
68 68
 
69
-                  ->setParameter      ('people'  , $people)
70
-                  ->setParameter      ('country' , $criteria['country'] )
71
-                  ->setParameter      ('state'   , $criteria['state']   )
72
-                  ->setParameter      ('city'    , $criteria['city']    )
73
-                  ->setParameter      ('district', $criteria['district'])
74
-                  ->setParameter      ('street'  , $criteria['street']  )
75
-                  ->setParameter      ('number'  , $criteria['number']  )
69
+                    ->setParameter      ('people'  , $people)
70
+                    ->setParameter      ('country' , $criteria['country'] )
71
+                    ->setParameter      ('state'   , $criteria['state']   )
72
+                    ->setParameter      ('city'    , $criteria['city']    )
73
+                    ->setParameter      ('district', $criteria['district'])
74
+                    ->setParameter      ('street'  , $criteria['street']  )
75
+                    ->setParameter      ('number'  , $criteria['number']  )
76 76
 
77
-                  ->getQuery()
78
-                  ->getResult()
79
-              ;
77
+                    ->getQuery()
78
+                    ->getResult()
79
+                ;
80 80
 
81
-      if (empty($result))
81
+        if (empty($result))
82 82
         return null;
83 83
 
84
-      return $result[0];
84
+        return $result[0];
85 85
     }
86 86
 }
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -23,21 +23,21 @@  discard block
 block discarded – undo
23 23
     public function findOneByCityStateCountryOfPeople(string $city, string $state, string $country, People $people): ?Address
24 24
     {
25 25
       $result = $this->createQueryBuilder('a')
26
-                  ->innerJoin         ('a.street'  , 's')
27
-                  ->innerJoin         ('s.district', 'd')
28
-                  ->innerJoin         ('d.city'    , 'c')
29
-                  ->innerJoin         ('c.state'   , 'e')
30
-                  ->innerJoin         ('e.country' , 'u')
26
+                  ->innerJoin('a.street', 's')
27
+                  ->innerJoin('s.district', 'd')
28
+                  ->innerJoin('d.city', 'c')
29
+                  ->innerJoin('c.state', 'e')
30
+                  ->innerJoin('e.country', 'u')
31 31
 
32
-                  ->andWhere          ('c.city        = :city'   )
33
-                  ->andWhere          ('e.uf          = :state'  )
34
-                  ->andWhere          ('u.countryname = :country')
35
-                  ->andWhere          ('a.people      = :people' )
32
+                  ->andWhere('c.city        = :city')
33
+                  ->andWhere('e.uf          = :state')
34
+                  ->andWhere('u.countryname = :country')
35
+                  ->andWhere('a.people      = :people')
36 36
 
37
-                  ->setParameter      ('city'   , $city   )
38
-                  ->setParameter      ('state'  , $state  )
39
-                  ->setParameter      ('country', $country)
40
-                  ->setParameter      ('people' , $people)
37
+                  ->setParameter('city', $city)
38
+                  ->setParameter('state', $state)
39
+                  ->setParameter('country', $country)
40
+                  ->setParameter('people', $people)
41 41
 
42 42
                   ->getQuery()
43 43
                   ->getResult()
@@ -52,27 +52,27 @@  discard block
 block discarded – undo
52 52
     public function findPeopleAddressBy(People $people, array $criteria): ?Address
53 53
     {
54 54
       $result = $this->createQueryBuilder('a')
55
-                  ->innerJoin         ('a.street'  , 's')
56
-                  ->innerJoin         ('s.district', 'd')
57
-                  ->innerJoin         ('d.city'    , 'c')
58
-                  ->innerJoin         ('c.state'   , 'e')
59
-                  ->innerJoin         ('e.country' , 'u')
55
+                  ->innerJoin('a.street', 's')
56
+                  ->innerJoin('s.district', 'd')
57
+                  ->innerJoin('d.city', 'c')
58
+                  ->innerJoin('c.state', 'e')
59
+                  ->innerJoin('e.country', 'u')
60 60
 
61
-                  ->andWhere          ('a.people      = :people'  )
62
-                  ->andWhere          ('u.countryname = :country' )
63
-                  ->andWhere          ('(e.uf = :state OR e.state = :state)')
64
-                  ->andWhere          ('c.city        = :city'    )
65
-                  ->andWhere          ('d.district    = :district')
66
-                  ->andWhere          ('s.street      = :street'  )
67
-                  ->andWhere          ('a.number      = :number'  )
61
+                  ->andWhere('a.people      = :people')
62
+                  ->andWhere('u.countryname = :country')
63
+                  ->andWhere('(e.uf = :state OR e.state = :state)')
64
+                  ->andWhere('c.city        = :city')
65
+                  ->andWhere('d.district    = :district')
66
+                  ->andWhere('s.street      = :street')
67
+                  ->andWhere('a.number      = :number')
68 68
 
69
-                  ->setParameter      ('people'  , $people)
70
-                  ->setParameter      ('country' , $criteria['country'] )
71
-                  ->setParameter      ('state'   , $criteria['state']   )
72
-                  ->setParameter      ('city'    , $criteria['city']    )
73
-                  ->setParameter      ('district', $criteria['district'])
74
-                  ->setParameter      ('street'  , $criteria['street']  )
75
-                  ->setParameter      ('number'  , $criteria['number']  )
69
+                  ->setParameter('people', $people)
70
+                  ->setParameter('country', $criteria['country'])
71
+                  ->setParameter('state', $criteria['state'])
72
+                  ->setParameter('city', $criteria['city'])
73
+                  ->setParameter('district', $criteria['district'])
74
+                  ->setParameter('street', $criteria['street'])
75
+                  ->setParameter('number', $criteria['number'])
76 76
 
77 77
                   ->getQuery()
78 78
                   ->getResult()
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,8 +43,9 @@  discard block
 block discarded – undo
43 43
                   ->getResult()
44 44
               ;
45 45
 
46
-      if (empty($result))
47
-        return null;
46
+      if (empty($result)) {
47
+              return null;
48
+      }
48 49
 
49 50
       return $result[0];
50 51
     }
@@ -78,8 +79,9 @@  discard block
 block discarded – undo
78 79
                   ->getResult()
79 80
               ;
80 81
 
81
-      if (empty($result))
82
-        return null;
82
+      if (empty($result)) {
83
+              return null;
84
+      }
83 85
 
84 86
       return $result[0];
85 87
     }
Please login to merge, or discard this patch.