Passed
Push — master ( 9d0dde...4d39d5 )
by Jan
08:02
created
src/Entity/Manufacturer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,6 +67,6 @@
 block discarded – undo
67 67
      */
68 68
     public function getIDString(): string
69 69
     {
70
-        return 'M' . sprintf('%06d', $this->getID());
70
+        return 'M'.sprintf('%06d', $this->getID());
71 71
     }
72 72
 }
73 73
\ No newline at end of file
Please login to merge, or discard this patch.
src/Entity/Category.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,6 +105,6 @@
 block discarded – undo
105 105
      */
106 106
     public function getIDString(): string
107 107
     {
108
-        return 'C' . sprintf('%09d', $this->getID());
108
+        return 'C'.sprintf('%09d', $this->getID());
109 109
     }
110 110
 }
Please login to merge, or discard this patch.
src/DataTables/PartsDataTable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,8 +75,8 @@
 block discarded – undo
75 75
             ->createAdapter(ORMAdapter::class, [
76 76
                 'entity' => Part::class,
77 77
                 'criteria' => [
78
-                function (QueryBuilder $builder) use($options) {
79
-                    if(isset($options['cid'])) {
78
+                function(QueryBuilder $builder) use($options) {
79
+                    if (isset($options['cid'])) {
80 80
                         $builder->andWhere('part.category = :cid')
81 81
                             ->setParameter('cid', $options['cid']);
82 82
                     }
Please login to merge, or discard this patch.
src/Entity/Storelocation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
      */
100 100
     public function getIDString(): string
101 101
     {
102
-        return 'L' . sprintf('%06d', $this->getID());
102
+        return 'L'.sprintf('%06d', $this->getID());
103 103
     }
104 104
 
105 105
 }
106 106
\ No newline at end of file
Please login to merge, or discard this patch.
src/Entity/Part.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
  */
49 49
 class Part extends AttachmentContainingDBElement
50 50
 {
51
-    const INSTOCK_UNKNOWN   = -2;
51
+    const INSTOCK_UNKNOWN = -2;
52 52
 
53 53
     /**
54 54
      * @var Category
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function getIDString(): string
172 172
     {
173
-        return 'P' . sprintf('%06d', $this->getID());
173
+        return 'P'.sprintf('%06d', $this->getID());
174 174
     }
175 175
 
176 176
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
         }
248 248
 
249 249
         foreach ($all_orderdetails as $orderdetails) {
250
-            if (! $orderdetails->getObsolete()) {
250
+            if (!$orderdetails->getObsolete()) {
251 251
                 return false;
252 252
             }
253 253
         }
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
         $prices = array();
611 611
 
612 612
         foreach ($this->getOrderdetails($hide_obsolete) as $details) {
613
-            $prices[] = $details->getPrice(! $float_array, $quantity, $multiplier);
613
+            $prices[] = $details->getPrice(!$float_array, $quantity, $multiplier);
614 614
         }
615 615
 
616 616
         if (\is_string($delimeter)) {
@@ -828,7 +828,7 @@  discard block
 block discarded – undo
828 828
      */
829 829
     public function setInstockUnknown(bool $new_unknown) : self
830 830
     {
831
-        if($new_unknown == true) {
831
+        if ($new_unknown == true) {
832 832
             $this->instock = self::INSTOCK_UNKNOWN;
833 833
         } else {
834 834
             //Change only if instock is currently unknown.
Please login to merge, or discard this patch.
src/Controller/PartController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
             $em->persist($new_part);
107 107
             $em->flush();
108 108
             $this->addFlash('success', $translator->trans('part.created_flash'));
109
-            return $this->redirectToRoute('part_edit',['id' => $new_part->getID()]);
109
+            return $this->redirectToRoute('part_edit', ['id' => $new_part->getID()]);
110 110
         }
111 111
 
112 112
 
Please login to merge, or discard this patch.
src/Services/EntityURLGenerator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function infoURL($entity) : string
62 62
     {
63
-        if($entity instanceof Part)
63
+        if ($entity instanceof Part)
64 64
         {
65 65
             return $this->urlGenerator->generate('part_info', ['id' => $entity->getID()]);
66 66
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     public function editURL($entity) : string
73 73
     {
74
-        if($entity instanceof Part)
74
+        if ($entity instanceof Part)
75 75
         {
76 76
             return $this->urlGenerator->generate('part_edit', ['id' => $entity->getID()]);
77 77
         }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
     public function createURL($entity) : string
84 84
     {
85
-        if($entity instanceof Part)
85
+        if ($entity instanceof Part)
86 86
         {
87 87
             return $this->urlGenerator->generate('part_new');
88 88
         }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     {
102 102
         $href = $this->infoURL($entity);
103 103
 
104
-        if($entity instanceof NamedDBElement)
104
+        if ($entity instanceof NamedDBElement)
105 105
         {
106 106
             return sprintf('<a href="%s">%s</a>', $href, $entity->getName());
107 107
         }
Please login to merge, or discard this patch.
src/Twig/AppExtension.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function generateEntityURL(DBElement $entity, string $method = 'info') : string
63 63
     {
64
-        switch($method) {
64
+        switch ($method) {
65 65
             case 'info':
66 66
                 return $this->entityURLGenerator->infoURL($entity);
67 67
             case 'edit':
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
 
76 76
     public function parseBBCode(string $bbcode) : string
77 77
     {
78
-        if($bbcode === '') return '';
78
+        if ($bbcode === '') return '';
79 79
 
80
-        $item = $this->cache->getItem('bbcode_' . md5($bbcode));
81
-        if(!$item->isHit()) {
80
+        $item = $this->cache->getItem('bbcode_'.md5($bbcode));
81
+        if (!$item->isHit()) {
82 82
             $xml = TextFormatter::parse($bbcode);
83 83
             $item->set(TextFormatter::render($xml));
84 84
             $this->cache->save($item);
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,9 @@
 block discarded – undo
75 75
 
76 76
     public function parseBBCode(string $bbcode) : string
77 77
     {
78
-        if($bbcode === '') return '';
78
+        if($bbcode === '') {
79
+         return '';
80
+        }
79 81
 
80 82
         $item = $this->cache->getItem('bbcode_' . md5($bbcode));
81 83
         if(!$item->isHit()) {
Please login to merge, or discard this patch.
src/Controller/UserController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
     {
58 58
 
59 59
         //If no user id was passed, then we show info about the current user
60
-        if($user == null) {
60
+        if ($user == null) {
61 61
             $user = $this->getUser();
62 62
         }
63 63
 
64
-        if($this->getParameter("use_gravatar")) {
64
+        if ($this->getParameter("use_gravatar")) {
65 65
             $avatar = $this->getGravatar($user->getEmail(), 200, 'identicon');
66 66
         } else {
67 67
             $avatar = $packages->getUrl("/img/default_avatar.png");
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         $pw_form->handleRequest($request);
126 126
 
127 127
         //Check if password if everything was correct, then save it to User and DB
128
-        if($pw_form->isSubmitted() && $pw_form->isValid()) {
128
+        if ($pw_form->isSubmitted() && $pw_form->isValid()) {
129 129
             $password = $passwordEncoder->encodePassword($user, $pw_form['new_password']->getData());
130 130
             $user->setPassword($password);
131 131
             $em->persist($user);
@@ -162,9 +162,9 @@  discard block
 block discarded – undo
162 162
         $url .= md5(strtolower(trim($email)));
163 163
         $url .= "?s=$s&d=$d&r=$r";
164 164
         if ($img) {
165
-            $url = '<img src="' . $url . '"';
165
+            $url = '<img src="'.$url.'"';
166 166
             foreach ($atts as $key => $val) {
167
-                $url .= ' ' . $key . '="' . $val . '"';
167
+                $url .= ' '.$key.'="'.$val.'"';
168 168
             }
169 169
             $url .= ' />';
170 170
         }
Please login to merge, or discard this patch.