Passed
Push — master ( f58276...a09b08 )
by Luiz Kim
03:50 queued 01:16
created
src/Controller/GetThemeColorsAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         $css = ':root{' . PHP_EOL;
35 35
         foreach ($theme->getColors(true) as $index => $color) {
36 36
             $css .= '    --q-' . $index . ': ' . $color . ';' . PHP_EOL;
37
-            $css .= '    --'   . $index . ': ' . $color . ';' . PHP_EOL;
37
+            $css .= '    --' . $index . ': ' . $color . ';' . PHP_EOL;
38 38
         }
39 39
         $css .= '}';
40 40
         return new Response($css, Response::HTTP_OK, [
Please login to merge, or discard this patch.
src/Repository/AddressRepository.php 1 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.
src/Controller/GetFileDataAction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $this->manager = $entityManager;
36 36
     }
37 37
 
38
-    public function __invoke(File $data,  Request $request)
38
+    public function __invoke(File $data, Request $request)
39 39
     {
40 40
 
41 41
         try {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 
48 48
             $content  = $file->getContent();
49
-            $response = new StreamedResponse(function () use ($content) {
49
+            $response = new StreamedResponse(function() use ($content) {
50 50
                 fputs(fopen('php://output', 'wb'), $content);
51 51
             });
52 52
 
Please login to merge, or discard this patch.
src/Service/PdfService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
     public function showPdf($content)
15 15
     {
16
-        $response = new StreamedResponse(function () use ($content) {
16
+        $response = new StreamedResponse(function() use ($content) {
17 17
             fputs(fopen('php://output', 'wb'), $content);
18 18
         });
19 19
 
Please login to merge, or discard this patch.
src/Service/WordPressService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         'query' => $input
21 21
       ]);
22 22
 
23
-      $result   = json_decode($response->getBody());
23
+      $result = json_decode($response->getBody());
24 24
 
25 25
       return $result;
26 26
     } catch (\Exception $e) {
Please login to merge, or discard this patch.
src/Service/ModelService.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
                 $origin = $order->getQuote()->getCityOrigin();
484 484
             }
485 485
 
486
-            $adresO =             $this->getAddress($origin);
486
+            $adresO = $this->getAddress($origin);
487 487
             if ($adresO) {
488 488
                 $resOrigin = $this->getAddressVars('origin', $adresO);
489 489
                 $data["origin_address"]       = $resOrigin["origin_address"];
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
                 $destination = $order->getQuote()->getCityDestination();
501 501
             }
502 502
 
503
-            $adresD =             $this->getAddress($destination);
503
+            $adresD = $this->getAddress($destination);
504 504
             if ($adresD) {
505 505
                 $resDestination = $this->getAddressVars('destination', $adresD);
506 506
                 $data["destination_address"]       = $resDestination["destination_address"];
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
         ];
562 562
 
563 563
         $peopleContract = $myContract->getPeoples()
564
-            ->filter(function ($contractPeople) {
564
+            ->filter(function($contractPeople) {
565 565
                 return $contractPeople->getPeopleType() == 'Payer';
566 566
             });
567 567
         if (!$peopleContract->isEmpty()) {
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
                 }
587 587
 
588 588
                 if (isset($contact['documents']['R.G'])) {
589
-                    $data['student_rg']  = $contact['documents']['R.G'];
589
+                    $data['student_rg'] = $contact['documents']['R.G'];
590 590
                 }
591 591
             }
592 592
 
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
         //// total per month
639 639
         $products = array_filter(
640 640
             $contractProducts,
641
-            function ($contractProduct) {
641
+            function($contractProduct) {
642 642
                 return $contractProduct['product_subtype'] == 'Package'
643 643
                     && $contractProduct['billing_unit'] == 'Monthly';
644 644
             }
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
         //// contract tax
657 657
         $products = array_filter(
658 658
             $contractProducts,
659
-            function ($contractProduct) {
659
+            function($contractProduct) {
660 660
                 return $contractProduct['product_type'] == 'Registration'
661 661
                     && $contractProduct['billing_unit'] == 'Single';
662 662
             }
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
         // monthly products
803 803
 
804 804
         $contractProduct = $myContract->getContractProduct()
805
-            ->filter(function ($contractProduct) {
805
+            ->filter(function($contractProduct) {
806 806
                 return $contractProduct->getProduct()->getProductSubtype() == 'Package'
807 807
                     && $contractProduct->getProduct()->getBillingUnit() == 'Monthly'
808 808
                     && $contractProduct->getPrice() > 0;
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
         // contract tax
816 816
 
817 817
         $contractProduct = $myContract->getContractProduct()
818
-            ->filter(function ($contractProduct) {
818
+            ->filter(function($contractProduct) {
819 819
                 return $contractProduct->getProduct()->getProductType() == 'Registration'
820 820
                     && $contractProduct->getProduct()->getBillingUnit() == 'Single'
821 821
                     && $contractProduct->getPrice() > 0;
@@ -883,15 +883,15 @@  discard block
 block discarded – undo
883 883
 
884 884
 
885 885
         return [
886
-            'id'         => $isAddress        ? $address->getId() : '',
887
-            'country'    => !empty($state)    ? $this->fixCountryName($state->getCountry()->getCountryName()) : '',
888
-            'state'      => !empty($state)    ? $state->getUF() : '',
889
-            'city'       => !empty($city)     ? $city->getCity() : '',
886
+            'id'         => $isAddress ? $address->getId() : '',
887
+            'country'    => !empty($state) ? $this->fixCountryName($state->getCountry()->getCountryName()) : '',
888
+            'state'      => !empty($state) ? $state->getUF() : '',
889
+            'city'       => !empty($city) ? $city->getCity() : '',
890 890
             'district'   => !empty($district) ? $district->getDistrict() : '',
891
-            'postalCode' => !empty($street)   ? $this->fixPostalCode($street->getCep()->getCep()) : '',
892
-            'street'     => !empty($street)   ? $street->getStreet() : '',
893
-            'number'     => $isAddress        ? $address->getNumber() : '',
894
-            'complement' => $isAddress        ? $address->getComplement() : '',
891
+            'postalCode' => !empty($street) ? $this->fixPostalCode($street->getCep()->getCep()) : '',
892
+            'street'     => !empty($street) ? $street->getStreet() : '',
893
+            'number'     => $isAddress ? $address->getNumber() : '',
894
+            'complement' => $isAddress ? $address->getComplement() : '',
895 895
         ];
896 896
     }
897 897
 
@@ -902,14 +902,14 @@  discard block
 block discarded – undo
902 902
 
903 903
     protected function fixPostalCode(int $postalCode): string
904 904
     {
905
-        $code = (string)$postalCode;
905
+        $code = (string) $postalCode;
906 906
         return strlen($code) == 7 ? '0' . $code : $code;
907 907
     }
908 908
 
909 909
     protected function getContractPeoplePayers(MyContract $contract): array
910 910
     {
911 911
         $contractPeople = $contract->getPeoples()
912
-            ->filter(function ($contractPeople) {
912
+            ->filter(function($contractPeople) {
913 913
                 return $contractPeople->getPeopleType() == 'Payer' && $contractPeople->getContractPercentage() > 0;
914 914
             });
915 915
 
Please login to merge, or discard this patch.
src/Service/DomainService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,11 +57,11 @@
 block discarded – undo
57 57
     {
58 58
         if (self::$peopleDomain) return self::$peopleDomain;
59 59
 
60
-        $domain  = $this->getDomain();
60
+        $domain = $this->getDomain();
61 61
         self::$peopleDomain = $this->manager->getRepository(PeopleDomain::class)->findOneBy(['domain' => $domain]);
62 62
 
63 63
         if (!self::$peopleDomain) {
64
-            $domain  = $this->getMainDomain();
64
+            $domain = $this->getMainDomain();
65 65
             self::$peopleDomain = $this->manager->getRepository(PeopleDomain::class)->findOneBy(['domain' => $domain]);
66 66
         }
67 67
 
Please login to merge, or discard this patch.
src/Service/ConfigService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
     public function getConfig(People $people, $key, $json = false)
20 20
     {
21 21
         $config = $this->discoveryConfig($people, $key, false);
22
-        $value =  $config ? $config->getConfigValue() : null;
22
+        $value = $config ? $config->getConfigValue() : null;
23 23
         return $json ? json_decode($value, true) : $value;
24 24
     }
25 25
 
26 26
     private function discoveryConfig(People $people, $key, $create = true): ?Config
27 27
     {
28
-        $config =   $this->manager->getRepository(Config::class)->findOneBy([
28
+        $config = $this->manager->getRepository(Config::class)->findOneBy([
29 29
             'people' => $people,
30 30
             'configKey' => $key
31 31
         ]);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
     private function discoveryInfinitePayWallet(People $company)
151 151
     {
152
-        $paymentTypes =  [
152
+        $paymentTypes = [
153 153
             [
154 154
                 'paymentType' => 'Débito',
155 155
                 'frequency' => 'single',
Please login to merge, or discard this patch.
src/Controller/GetMenuByPeopleAction.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
    *
28 28
    * @var Request
29 29
    */
30
-  private $request  = null;
30
+  private $request = null;
31 31
 
32 32
   /**
33 33
    * Security
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
   {
54 54
     try {
55 55
 
56
-      $menu  = [];
56
+      $menu = [];
57 57
 
58 58
       $company = $request->query->get('myCompany', null);
59 59
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
        */
76 76
       $userPeople = $currentUser->getPeople();
77 77
 
78
-      $menu =  $this->getMenuByPeople($userPeople, $myCompany);
78
+      $menu = $this->getMenuByPeople($userPeople, $myCompany);
79 79
 
80 80
 
81 81
       return new JsonResponse([
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
     // build query
109 109
 
110
-    $sql  = 'SELECT menu.*,
110
+    $sql = 'SELECT menu.*,
111 111
             category.name AS category_label,
112 112
             category.color AS category_color,
113 113
             routes.route AS route,
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 
127 127
     $params = [];
128 128
 
129
-    $params['myCompany']   = $myCompany->getId();
130
-    $params['userPeople']   = $userPeople->getId();
129
+    $params['myCompany'] = $myCompany->getId();
130
+    $params['userPeople'] = $userPeople->getId();
131 131
     // execute query
132 132
 
133 133
     $result = $connection->executeQuery($sql, $params)->fetchAllAssociative();
Please login to merge, or discard this patch.