Passed
Push — master ( f32ae8...50cca4 )
by Jan
04:31
created
src/Validator/Constraints/ValidPartLotValidator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function validate($value, Constraint $constraint): void
69 69
     {
70
-        if (! $constraint instanceof ValidPartLot) {
70
+        if (!$constraint instanceof ValidPartLot) {
71 71
             throw new UnexpectedTypeException($constraint, ValidPartLot::class);
72 72
         }
73 73
 
74
-        if (! $value instanceof PartLot) {
74
+        if (!$value instanceof PartLot) {
75 75
             throw new UnexpectedTypeException($value, PartLot::class);
76 76
         }
77 77
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                         ->atPath('amount')->addViolation();
98 98
                 }
99 99
 
100
-                if (! $parts->contains($value->getPart())) {
100
+                if (!$parts->contains($value->getPart())) {
101 101
                     $this->context->buildViolation('validator.part_lot.location_full')
102 102
                         ->atPath('storage_location')->addViolation();
103 103
                 }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
             //Check for onlyExisting
107 107
             if ($value->getStorageLocation()->isLimitToExistingParts()) {
108
-                if (! $parts->contains($value->getPart())) {
108
+                if (!$parts->contains($value->getPart())) {
109 109
                     $this->context->buildViolation('validator.part_lot.only_existing')
110 110
                         ->atPath('storage_location')->addViolation();
111 111
                 }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
             //Check for only single part
115 115
             if ($value->getStorageLocation()->isOnlySinglePart()) {
116
-                if (($parts->count() > 0) && ! $parts->contains($value->getPart())) {
116
+                if (($parts->count() > 0) && !$parts->contains($value->getPart())) {
117 117
                     $this->context->buildViolation('validator.part_lot.single_part')
118 118
                         ->atPath('storage_location')->addViolation();
119 119
                 }
Please login to merge, or discard this patch.
src/Repository/Parts/FootprintRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 {
29 29
     public function getParts(object $element, array $order_by = ['name' => 'ASC']): array
30 30
     {
31
-        if(!$element instanceof Footprint) {
31
+        if (!$element instanceof Footprint) {
32 32
             throw new \InvalidArgumentException('$element must be an Footprint!');
33 33
         }
34 34
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     public function getPartsCount(object $element): int
39 39
     {
40
-        if(!$element instanceof Footprint) {
40
+        if (!$element instanceof Footprint) {
41 41
             throw new \InvalidArgumentException('$element must be an Footprint!');
42 42
         }
43 43
 
Please login to merge, or discard this patch.
src/Repository/Parts/SupplierRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 {
31 31
     public function getParts(object $element, array $order_by = ['name' => 'ASC']): array
32 32
     {
33
-        if(!$element instanceof Supplier) {
33
+        if (!$element instanceof Supplier) {
34 34
             throw new \InvalidArgumentException('$element must be an Supplier!');
35 35
         }
36 36
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             ->setParameter(1, $element);
44 44
 
45 45
         foreach ($order_by as $field => $order) {
46
-            $qb->addOrderBy('part.' . $field, $order);
46
+            $qb->addOrderBy('part.'.$field, $order);
47 47
         }
48 48
 
49 49
         return $qb->getQuery()->getResult();
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function getPartsCount(object $element): int
53 53
     {
54
-        if(!$element instanceof Supplier) {
54
+        if (!$element instanceof Supplier) {
55 55
             throw new \InvalidArgumentException('$element must be an Supplier!');
56 56
         }
57 57
 
Please login to merge, or discard this patch.
src/Repository/Parts/StorelocationRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function getParts(object $element, array $order_by = ['name' => 'ASC']): array
36 36
     {
37
-        if(!$element instanceof Storelocation) {
37
+        if (!$element instanceof Storelocation) {
38 38
             throw new \InvalidArgumentException('$element must be an Storelocation!');
39 39
         }
40 40
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             ->setParameter(1, $element);
48 48
 
49 49
         foreach ($order_by as $field => $order) {
50
-            $qb->addOrderBy('part.' . $field, $order);
50
+            $qb->addOrderBy('part.'.$field, $order);
51 51
         }
52 52
 
53 53
         return $qb->getQuery()->getResult();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function getPartsCount(object $element): int
57 57
     {
58
-        if(!$element instanceof Storelocation) {
58
+        if (!$element instanceof Storelocation) {
59 59
             throw new \InvalidArgumentException('$element must be an Storelocation!');
60 60
         }
61 61
 
Please login to merge, or discard this patch.