Passed
Push — master ( 8b5418...e09dec )
by Luiz Kim
04:43 queued 02:12
created
src/Service/HydratorService.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,11 +89,13 @@
 block discarded – undo
89 89
     private function getMembers($class, $groups, mixed $arguments = [], int $limit = 0, int $page = 1, array $orderby = [])
90 90
     {
91 91
 
92
-        if ($limit < 1)
93
-            $limit = $this->request->get('itemsPerPage') ?: 50;
92
+        if ($limit < 1) {
93
+                    $limit = $this->request->get('itemsPerPage') ?: 50;
94
+        }
94 95
 
95
-        if ($page == 1)
96
-            $offset = (($page = $this->request->get('page') ?: 1) - 1) * $limit;
96
+        if ($page == 1) {
97
+                    $offset = (($page = $this->request->get('page') ?: 1) - 1) * $limit;
98
+        }
97 99
 
98 100
         $data =     $this->manager->getRepository($class)->findBy($arguments, $orderby, $limit, $offset);
99 101
 
Please login to merge, or discard this patch.
src/Repository/AddressRepository.php 1 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.
src/Controller/GetMenuByPeopleAction.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,15 +56,17 @@
 block discarded – undo
56 56
 
57 57
       $company = $request->query->get('myCompany', null);
58 58
 
59
-      if ($company === null)
60
-        throw new Exception("Company not found", 404);
59
+      if ($company === null) {
60
+              throw new Exception("Company not found", 404);
61
+      }
61 62
 
62 63
 
63 64
       $myCompany = $this->manager->getRepository(People::class)
64 65
         ->find($company);
65 66
 
66
-      if ($myCompany === null)
67
-        throw new Exception("Company not found", 404);
67
+      if ($myCompany === null) {
68
+              throw new Exception("Company not found", 404);
69
+      }
68 70
 
69 71
 
70 72
 
Please login to merge, or discard this patch.
src/Repository/ConfigRepository.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -64,8 +64,9 @@  discard block
 block discarded – undo
64 64
       ->getQuery()
65 65
       ->getResult();
66 66
 
67
-    if (empty($result))
68
-      return null;
67
+    if (empty($result)) {
68
+          return null;
69
+    }
69 70
 
70 71
     $configs = [];
71 72
 
@@ -88,8 +89,9 @@  discard block
 block discarded – undo
88 89
     ]);
89 90
 
90 91
 
91
-    if (empty($config) || $config->getConfigValue() != 'itau')
92
-      return null;
92
+    if (empty($config) || $config->getConfigValue() != 'itau') {
93
+          return null;
94
+    }
93 95
 
94 96
     $result = $this->createQueryBuilder('a')
95 97
       ->andWhere('a.people = :people')
@@ -99,8 +101,9 @@  discard block
 block discarded – undo
99 101
       ->getQuery()
100 102
       ->getResult();
101 103
 
102
-    if (empty($result))
103
-      return null;
104
+    if (empty($result)) {
105
+          return null;
106
+    }
104 107
 
105 108
     $configs = [];
106 109
 
@@ -125,8 +128,9 @@  discard block
 block discarded – undo
125 128
       ->getQuery()
126 129
       ->getResult();
127 130
 
128
-    if (empty($result))
129
-      return null;
131
+    if (empty($result)) {
132
+          return null;
133
+    }
130 134
 
131 135
     $configs = [];
132 136
 
Please login to merge, or discard this patch.
src/Service/ModelService.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -846,8 +846,9 @@
 block discarded – undo
846 846
 
847 847
     protected function getPeopleAddress(People $people): ?array
848 848
     {
849
-        if (($address = $people->getAddress()->first()) === false)
850
-            return null;
849
+        if (($address = $people->getAddress()->first()) === false) {
850
+                    return null;
851
+        }
851 852
 
852 853
         return $this->getAddress($address);
853 854
     }
Please login to merge, or discard this patch.
src/Service/DomainService.php 1 patch
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,8 +43,9 @@  discard block
 block discarded – undo
43 43
             )
44 44
         ));
45 45
 
46
-        if (!$domain)
47
-            throw new InvalidArgumentException('Please define header or get param "app-domain"', 301);
46
+        if (!$domain) {
47
+                    throw new InvalidArgumentException('Please define header or get param "app-domain"', 301);
48
+        }
48 49
         return $domain;
49 50
     }
50 51
 
@@ -55,7 +56,9 @@  discard block
 block discarded – undo
55 56
 
56 57
     public function getPeopleDomain(): PeopleDomain
57 58
     {
58
-        if (self::$peopleDomain) return self::$peopleDomain;
59
+        if (self::$peopleDomain) {
60
+            return self::$peopleDomain;
61
+        }
59 62
 
60 63
         $domain  = $this->getDomain();
61 64
         self::$peopleDomain = $this->manager->getRepository(PeopleDomain::class)->findOneBy(['domain' => $domain]);
@@ -65,10 +68,11 @@  discard block
 block discarded – undo
65 68
             self::$peopleDomain = $this->manager->getRepository(PeopleDomain::class)->findOneBy(['domain' => $domain]);
66 69
         }
67 70
 
68
-        if (self::$peopleDomain === null)
69
-            throw new \Exception(
71
+        if (self::$peopleDomain === null) {
72
+                    throw new \Exception(
70 73
                 sprintf('Main company "%s" not found', $domain)
71 74
             );
75
+        }
72 76
 
73 77
         return self::$peopleDomain;
74 78
     }
Please login to merge, or discard this patch.
src/Controller/GetFileDataAction.php 1 patch
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,8 +41,9 @@  discard block
 block discarded – undo
41 41
         try {
42 42
             $file = $data;
43 43
             //$file = $this->manager->getRepository(File::class)->findOneBy(['url' => $request->getPathInfo()]);
44
-            if (!$file)
45
-                throw new \Exception('Not found', 404);
44
+            if (!$file) {
45
+                            throw new \Exception('Not found', 404);
46
+            }
46 47
 
47 48
 
48 49
             $content  = $file->getContent();
@@ -58,10 +59,11 @@  discard block
 block discarded – undo
58 59
                 $response->headers->set('Content-Type', "$fileType/$ext");
59 60
             }
60 61
 
61
-            if ($fileType == 'image')
62
-                $disposition = HeaderUtils::makeDisposition(HeaderUtils::DISPOSITION_INLINE, basename($request->getPathInfo()));
63
-            else
64
-                $disposition = HeaderUtils::makeDisposition(HeaderUtils::DISPOSITION_ATTACHMENT, basename($request->getPathInfo()));
62
+            if ($fileType == 'image') {
63
+                            $disposition = HeaderUtils::makeDisposition(HeaderUtils::DISPOSITION_INLINE, basename($request->getPathInfo()));
64
+            } else {
65
+                            $disposition = HeaderUtils::makeDisposition(HeaderUtils::DISPOSITION_ATTACHMENT, basename($request->getPathInfo()));
66
+            }
65 67
 
66 68
             $response->headers->set('Content-Disposition', $disposition);
67 69
 
Please login to merge, or discard this patch.
src/Listener/DefaultEventListener.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,9 @@
 block discarded – undo
54 54
             if (method_exists($service, $method)) {
55 55
                 $newEntity = $service->$method($entity);
56 56
 
57
-                if ('postPersist' === $method && $newEntity)
58
-                    $this->manager->refresh($newEntity);
57
+                if ('postPersist' === $method && $newEntity) {
58
+                                    $this->manager->refresh($newEntity);
59
+                }
59 60
             }
60 61
         }
61 62
         return $entity;
Please login to merge, or discard this patch.
src/Service/PrintService.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,9 @@
 block discarded – undo
21 21
     {
22 22
         $initialSpace = str_repeat(" ", $this->initialSpace);
23 23
         $count =   $this->totalChars - $this->initialSpace - strlen($prefix) - strlen($suffix);
24
-        if ($count > 0)
25
-            $delimiter = str_repeat($delimiter, $count);
24
+        if ($count > 0) {
25
+                    $delimiter = str_repeat($delimiter, $count);
26
+        }
26 27
         $this->text .= $initialSpace . $prefix . $delimiter . $suffix . "\n";
27 28
     }
28 29
 
Please login to merge, or discard this patch.