Passed
Push — master ( 892132...fe0f69 )
by Jan
04:10
created
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/Base/StructuralDBElement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
         //Check if both elements compared, are from the same type
119 119
         // (we have to check inheritance, or we get exceptions when using doctrine entities (they have a proxy type):
120
-        if (! is_a($another_element, $class_name) && ! is_a($this, \get_class($another_element))) {
120
+        if (!is_a($another_element, $class_name) && !is_a($this, \get_class($another_element))) {
121 121
             throw new \InvalidArgumentException('isChildOf() only works for objects of the same type!');
122 122
         }
123 123
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     public function getFullPath(string $delimiter = self::PATH_DELIMITER_ARROW): string
203 203
     {
204
-        if (! \is_array($this->full_path_strings)) {
204
+        if (!\is_array($this->full_path_strings)) {
205 205
             $this->full_path_strings = [];
206 206
             $this->full_path_strings[] = $this->getName();
207 207
             $element = $this;
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         $tmp[] = $this;
234 234
 
235 235
         //We only allow 20 levels depth
236
-        while (! end($tmp)->isRoot() && \count($tmp) < 20) {
236
+        while (!end($tmp)->isRoot() && \count($tmp) < 20) {
237 237
             $tmp[] = end($tmp)->parent;
238 238
         }
239 239
 
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.
src/Entity/UserSystem/PermissionsEmbed.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
      */
316 316
     public function getBitValue(string $permission_name, int $bit_n): int
317 317
     {
318
-        if (! $this->isValidPermissionName($permission_name)) {
318
+        if (!$this->isValidPermissionName($permission_name)) {
319 319
             throw new \InvalidArgumentException(sprintf('No permission with the name "%s" is existing!', $permission_name));
320 320
         }
321 321
 
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
      */
386 386
     public function setBitValue(string $permission_name, int $bit_n, int $new_value): self
387 387
     {
388
-        if (! $this->isValidPermissionName($permission_name)) {
388
+        if (!$this->isValidPermissionName($permission_name)) {
389 389
             throw new \InvalidArgumentException('No permission with the given name is existing!');
390 390
         }
391 391
 
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
      */
405 405
     public function getRawPermissionValue(string $permission_name): int
406 406
     {
407
-        if (! $this->isValidPermissionName($permission_name)) {
407
+        if (!$this->isValidPermissionName($permission_name)) {
408 408
             throw new \InvalidArgumentException('No permission with the given name is existing!');
409 409
         }
410 410
 
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
      */
422 422
     public function setRawPermissionValue(string $permission_name, int $value): self
423 423
     {
424
-        if (! $this->isValidPermissionName($permission_name)) {
424
+        if (!$this->isValidPermissionName($permission_name)) {
425 425
             throw new \InvalidArgumentException(sprintf('No permission with the given name %s is existing!', $permission_name));
426 426
         }
427 427
 
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
      */
442 442
     public function setRawPermissionValues(array $values, ?array $values2 = null): self
443 443
     {
444
-        if (! empty($values2)) {
444
+        if (!empty($values2)) {
445 445
             $values = array_combine($values, $values2);
446 446
         }
447 447
 
Please login to merge, or discard this patch.