Passed
Push — master ( 97f8af...d4e072 )
by Jan
04:34
created
src/Command/UpdateExchangeRatesCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
         $repo = $this->em->getRepository(Currency::class);
92 92
         $candidates = [];
93 93
 
94
-        if (! empty($iso_code)) {
94
+        if (!empty($iso_code)) {
95 95
             $candidates = $repo->findBy(['iso_code' => $iso_code]);
96 96
         } else {
97 97
             $candidates = $repo->findAll();
Please login to merge, or discard this patch.
src/Command/SetPasswordCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,14 +78,14 @@
 block discarded – undo
78 78
             sprintf('You are going to change the password of %s with ID %d. Proceed?',
79 79
                 $user->getFullName(true), $user->getID()));
80 80
 
81
-        if (! $proceed) {
81
+        if (!$proceed) {
82 82
             return;
83 83
         }
84 84
 
85 85
         $success = false;
86 86
         $new_password = '';
87 87
 
88
-        while (! $success) {
88
+        while (!$success) {
89 89
             $pw1 = $io->askHidden('Please enter new password:');
90 90
             $pw2 = $io->askHidden('Please confirm:');
91 91
             if ($pw1 !== $pw2) {
Please login to merge, or discard this patch.
src/Command/ConvertBBCodeCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                     //Retrieve bbcode from entity
139 139
                     $bbcode = $this->propertyAccessor->getValue($result, $property);
140 140
                     //Check if the current property really contains BBCode
141
-                    if (! preg_match(static::BBCODE_REGEX, $bbcode)) {
141
+                    if (!preg_match(static::BBCODE_REGEX, $bbcode)) {
142 142
                         continue;
143 143
                     }
144 144
                     $io->writeln(
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         }
160 160
 
161 161
         //If we are not in dry run, save changes to DB
162
-        if (! $input->getOption('dry-run')) {
162
+        if (!$input->getOption('dry-run')) {
163 163
             $this->em->flush();
164 164
             $io->success('Changes saved to DB successfully!');
165 165
         }
Please login to merge, or discard this patch.
src/Entity/Parts/PartTraits/InstockTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
137 137
     public function useFloatAmount(): bool
138 138
     {
139 139
         if ($this->partUnit instanceof MeasurementUnit) {
140
-            return ! $this->partUnit->isInteger();
140
+            return !$this->partUnit->isInteger();
141 141
         }
142 142
 
143 143
         //When no part unit is set, treat it as part count, and so use the integer value.
Please login to merge, or discard this patch.
src/Entity/Parts/PartTraits/OrderTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@
 block discarded – undo
188 188
         }
189 189
 
190 190
         foreach ($all_orderdetails as $orderdetails) {
191
-            if (! $orderdetails->getObsolete()) {
191
+            if (!$orderdetails->getObsolete()) {
192 192
                 return false;
193 193
             }
194 194
         }
Please login to merge, or discard this patch.
src/Entity/Parts/PartLot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@
 block discarded – undo
269 269
      */
270 270
     public function getAmount(): float
271 271
     {
272
-        if ($this->part instanceof Part && ! $this->part->useFloatAmount()) {
272
+        if ($this->part instanceof Part && !$this->part->useFloatAmount()) {
273 273
             return round($this->amount);
274 274
         }
275 275
 
Please login to merge, or discard this patch.
src/Entity/Attachments/Attachment.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             return true;
171 171
         }
172 172
 
173
-        return ! \in_array($tmp[0], array_merge(static::INTERNAL_PLACEHOLDER, static::BUILTIN_PLACEHOLDER), false);
173
+        return !\in_array($tmp[0], array_merge(static::INTERNAL_PLACEHOLDER, static::BUILTIN_PLACEHOLDER), false);
174 174
     }
175 175
 
176 176
     /**
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             return null;
222 222
         }
223 223
 
224
-        if (! empty($this->original_filename)) {
224
+        if (!empty($this->original_filename)) {
225 225
             return strtolower(pathinfo($this->original_filename, PATHINFO_EXTENSION));
226 226
         }
227 227
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
      */
245 245
     public function getURL(): ?string
246 246
     {
247
-        if (! $this->isExternal() && ! $this->isBuiltIn()) {
247
+        if (!$this->isExternal() && !$this->isBuiltIn()) {
248 248
             return null;
249 249
         }
250 250
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
      */
258 258
     public function getHost(): ?string
259 259
     {
260
-        if (! $this->isExternal()) {
260
+        if (!$this->isExternal()) {
261 261
             return null;
262 262
         }
263 263
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         }
288 288
 
289 289
         //If we have a stored original filename, then use it
290
-        if (! empty($this->original_filename)) {
290
+        if (!empty($this->original_filename)) {
291 291
             return $this->original_filename;
292 292
         }
293 293
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
      */
363 363
     public function setElement(AttachmentContainingDBElement $element): self
364 364
     {
365
-        if (! is_a($element, static::ALLOWED_ELEMENT_CLASS)) {
365
+        if (!is_a($element, static::ALLOWED_ELEMENT_CLASS)) {
366 366
             throw new \InvalidArgumentException(sprintf('The element associated with a %s must be a %s!', static::class, static::ALLOWED_ELEMENT_CLASS));
367 367
         }
368 368
 
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
     public function setURL(?string $url): self
405 405
     {
406 406
         //Only set if the URL is not empty
407
-        if (! empty($url)) {
407
+        if (!empty($url)) {
408 408
             if (false !== strpos($url, '%BASE%') || false !== strpos($url, '%MEDIA%')) {
409 409
                 throw new \InvalidArgumentException('You can not reference internal files via the url field! But nice try!');
410 410
             }
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
         if ($only_http) {   //Check if scheme is HTTPS or HTTP
456 456
             $scheme = parse_url($string, PHP_URL_SCHEME);
457 457
             if ('http' !== $scheme && 'https' !== $scheme) {
458
-                return false;   //All other schemes are not valid.
458
+                return false; //All other schemes are not valid.
459 459
             }
460 460
         }
461 461
         if ($path_required) {
Please login to merge, or discard this patch.
src/Entity/PriceInformations/Pricedetail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      */
181 181
     public function getPriceRelatedQuantity(): float
182 182
     {
183
-        if ($this->orderdetail && $this->orderdetail->getPart() && ! $this->orderdetail->getPart()->useFloatAmount()) {
183
+        if ($this->orderdetail && $this->orderdetail->getPart() && !$this->orderdetail->getPart()->useFloatAmount()) {
184 184
             $tmp = round($this->price_related_quantity);
185 185
 
186 186
             return $tmp < 1 ? 1 : $tmp;
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public function getMinDiscountQuantity(): float
205 205
     {
206
-        if ($this->orderdetail && $this->orderdetail->getPart() && ! $this->orderdetail->getPart()->useFloatAmount()) {
206
+        if ($this->orderdetail && $this->orderdetail->getPart() && !$this->orderdetail->getPart()->useFloatAmount()) {
207 207
             $tmp = round($this->min_discount_quantity);
208 208
 
209 209
             return $tmp < 1 ? 1 : $tmp;
Please login to merge, or discard this patch.
src/Entity/UserSystem/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -516,7 +516,7 @@
 block discarded – undo
516 516
     public function setName(string $new_name): NamedDBElement
517 517
     {
518 518
         // Anonymous user is not allowed to change its username
519
-        if (! $this->isAnonymousUser()) {
519
+        if (!$this->isAnonymousUser()) {
520 520
             $this->name = $new_name;
521 521
         }
522 522
 
Please login to merge, or discard this patch.