Passed
Push — master ( dd424d...da8d36 )
by Luiz Kim
09:52 queued 07:21
created
src/Entity/Theme.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,6 @@
 block discarded – undo
66 66
      *
67 67
      * @ORM\Column(name="background", type="integer", nullable=true)
68 68
      * @Groups({"theme:read"})
69
-
70 69
      */
71 70
     private $background;
72 71
     /**
Please login to merge, or discard this patch.
src/Service/FileService.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@
 block discarded – undo
19 19
 
20 20
     public function getFileUrl(People $people): ?array
21 21
     {
22
-      if ($people->getImage() instanceof File)
22
+        if ($people->getImage() instanceof File)
23 23
         return [
24
-          'id'     => $people->getImage()->getId(),
25
-          'domain' => $this->domainService->getMainDomain(),
26
-          'url'    => '/files/' . $people->getImage()->getId() . '/download'
24
+            'id'     => $people->getImage()->getId(),
25
+            'domain' => $this->domainService->getMainDomain(),
26
+            'url'    => '/files/' . $people->getImage()->getId() . '/download'
27 27
         ];
28 28
   
29
-      return null;
29
+        return null;
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,12 +19,13 @@
 block discarded – undo
19 19
 
20 20
     public function getFileUrl(People $people): ?array
21 21
     {
22
-      if ($people->getImage() instanceof File)
23
-        return [
22
+      if ($people->getImage() instanceof File) {
23
+              return [
24 24
           'id'     => $people->getImage()->getId(),
25 25
           'domain' => $this->domainService->getMainDomain(),
26 26
           'url'    => '/files/' . $people->getImage()->getId() . '/download'
27 27
         ];
28
+      }
28 29
   
29 30
       return null;
30 31
     }
Please login to merge, or discard this patch.
src/Service/DomainService.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     {
58 58
         if (self::$peopleDomain) return self::$peopleDomain;
59 59
         
60
-        $domain  = $this->getMainDomain();
60
+        $domain = $this->getMainDomain();
61 61
         self::$peopleDomain = $this->manager->getRepository(PeopleDomain::class)->findOneBy(['domain' => $domain]);
62 62
 
63 63
         if (self::$peopleDomain === null)
Please login to merge, or discard this 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,15 +56,18 @@  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->getMainDomain();
61 64
         self::$peopleDomain = $this->manager->getRepository(PeopleDomain::class)->findOneBy(['domain' => $domain]);
62 65
 
63
-        if (self::$peopleDomain === null)
64
-            throw new \Exception(
66
+        if (self::$peopleDomain === null) {
67
+                    throw new \Exception(
65 68
                 sprintf('Main company "%s" not found', $domain)
66 69
             );
70
+        }
67 71
 
68 72
         return self::$peopleDomain;
69 73
     }
Please login to merge, or discard this patch.