Passed
Push — master ( 819bdd...5c0f86 )
by Luiz Kim
02:53
created
src/Entity/Country.php 1 patch
Indentation   -15 removed lines patch added patch discarded remove patch
@@ -33,7 +33,6 @@  discard block
 block discarded – undo
33 33
      *
34 34
      * @ORM\Column(name="countryCode", type="string", length=3, nullable=false)
35 35
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
36
-
37 36
      */
38 37
     private $countrycode;
39 38
     /**
@@ -48,7 +47,6 @@  discard block
 block discarded – undo
48 47
      *
49 48
      * @ORM\Column(name="currencyCode", type="string", length=3, nullable=true)
50 49
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
51
-
52 50
      */
53 51
     private $currencycode;
54 52
     /**
@@ -56,7 +54,6 @@  discard block
 block discarded – undo
56 54
      *
57 55
      * @ORM\Column(name="population", type="integer", nullable=true)
58 56
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
59
-
60 57
      */
61 58
     private $population;
62 59
     /**
@@ -64,7 +61,6 @@  discard block
 block discarded – undo
64 61
      *
65 62
      * @ORM\Column(name="fipsCode", type="string", length=2, nullable=true)
66 63
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
67
-
68 64
      */
69 65
     private $fipscode;
70 66
     /**
@@ -80,7 +76,6 @@  discard block
 block discarded – undo
80 76
      *
81 77
      * @ORM\Column(name="north", type="string", length=30, nullable=true)
82 78
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
83
-
84 79
      */
85 80
     private $north;
86 81
     /**
@@ -88,7 +83,6 @@  discard block
 block discarded – undo
88 83
      *
89 84
      * @ORM\Column(name="south", type="string", length=30, nullable=true)
90 85
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
91
-
92 86
      */
93 87
     private $south;
94 88
     /**
@@ -97,7 +91,6 @@  discard block
 block discarded – undo
97 91
      * @ORM\Column(name="east", type="string", length=30, nullable=true)
98 92
      * 
99 93
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
100
-
101 94
      */
102 95
     private $east;
103 96
     /**
@@ -105,7 +98,6 @@  discard block
 block discarded – undo
105 98
      *
106 99
      * @ORM\Column(name="west", type="string", length=30, nullable=true)
107 100
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
108
-
109 101
      */
110 102
     private $west;
111 103
     /**
@@ -113,7 +105,6 @@  discard block
 block discarded – undo
113 105
      *
114 106
      * @ORM\Column(name="capital", type="string", length=30, nullable=true)
115 107
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
116
-
117 108
      */
118 109
     private $capital;
119 110
     /**
@@ -121,7 +112,6 @@  discard block
 block discarded – undo
121 112
      *
122 113
      * @ORM\Column(name="continentName", type="string", length=15, nullable=true)
123 114
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
124
-
125 115
      */
126 116
     private $continentname;
127 117
     /**
@@ -129,7 +119,6 @@  discard block
 block discarded – undo
129 119
      *
130 120
      * @ORM\Column(name="continent", type="string", length=2, nullable=true)
131 121
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
132
-
133 122
      */
134 123
     private $continent;
135 124
     /**
@@ -137,7 +126,6 @@  discard block
 block discarded – undo
137 126
      *
138 127
      * @ORM\Column(name="areaInSqKm", type="string", length=20, nullable=true)
139 128
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
140
-
141 129
      */
142 130
     private $areainsqkm;
143 131
     /**
@@ -145,7 +133,6 @@  discard block
 block discarded – undo
145 133
      *
146 134
      * @ORM\Column(name="isoAlpha3", type="string", length=3, nullable=true)
147 135
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
148
-
149 136
      */
150 137
     private $isoalpha3;
151 138
     /**
@@ -153,7 +140,6 @@  discard block
 block discarded – undo
153 140
      *
154 141
      * @ORM\Column(name="geonameId", type="integer", nullable=true)
155 142
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
156
-
157 143
      */
158 144
     private $geonameid;
159 145
     /**
@@ -161,7 +147,6 @@  discard block
 block discarded – undo
161 147
      *
162 148
      * @ORM\OneToMany(targetEntity="ControleOnline\Entity\LanguageCountry", mappedBy="country")
163 149
      * @Groups({"city:read","logistic:read","state:read", "people:read","order_details:read","order:write", "address:read"})
164
-
165 150
      */
166 151
     private $languageCountry;
167 152
     /**
Please login to merge, or discard this patch.
src/Service/DomainService.php 2 patches
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.
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/FileUploadController.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,10 +39,12 @@
 block discarded – undo
39 39
             $fileType = explode('/', $file->getClientMimeType());
40 40
             $originalFilename = $file->getClientOriginalName();
41 41
 
42
-            if ($file_id)
43
-                $fileEntity = $this->em->getRepository(File::class)->find($file_id);
44
-            if (!$fileEntity)
45
-                $fileEntity = new File();
42
+            if ($file_id) {
43
+                            $fileEntity = $this->em->getRepository(File::class)->find($file_id);
44
+            }
45
+            if (!$fileEntity) {
46
+                            $fileEntity = new File();
47
+            }
46 48
 
47 49
             $fileEntity->setContext($context);
48 50
             $fileEntity->setContent($content);
Please login to merge, or discard this patch.