Passed
Push — master ( 0663a0...89258b )
by Jan
04:32
created
src/Controller/HomepageController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         $banner = $this->getParameter('banner');
56 56
         if (empty($banner)) {
57 57
             $banner_path = $this->kernel->getProjectDir()
58
-                . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'banner.md';
58
+                . DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'banner.md';
59 59
 
60 60
             return file_get_contents($banner_path);
61 61
         }
Please login to merge, or discard this patch.
src/Services/Attachments/AttachmentManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -173,6 +173,6 @@
 block discarded – undo
173 173
 
174 174
         $sz = 'BKMGTP';
175 175
         $factor = (int) floor((strlen($bytes) - 1) / 3);
176
-        return sprintf("%.{$decimals}f", $bytes / 1024 ** $factor) . @$sz[$factor];
176
+        return sprintf("%.{$decimals}f", $bytes / 1024 ** $factor).@$sz[$factor];
177 177
     }
178 178
 }
179 179
\ No newline at end of file
Please login to merge, or discard this patch.
src/Services/Attachments/BuiltinAttachmentsFinder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     protected function configureOptions(OptionsResolver $resolver)
57 57
     {
58 58
         $resolver->setDefaults([
59
-            'limit' => 15,  //Given only 15 entries
59
+            'limit' => 15, //Given only 15 entries
60 60
             //'allowed_extensions' => [], //Filter the filenames. For example ['jpg', 'jpeg'] to only get jpegs.
61 61
             //'placeholders' => Attachment::BUILTIN_PLACEHOLDER, //By default use all builtin ressources,
62 62
             'empty_returns_all' => false //Return the whole list of ressources when empty keyword is given
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     public function getListOfRessources() : array
73 73
     {
74 74
         try {
75
-            return $this->cache->get('attachment_builtin_ressources', function () {
75
+            return $this->cache->get('attachment_builtin_ressources', function() {
76 76
                 $results = [];
77 77
 
78 78
                 $finder = new Finder();
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         } */
147 147
 
148 148
         //Ignore case
149
-        $regex = '/.*' . $keyword . '.*/i';
149
+        $regex = '/.*'.$keyword.'.*/i';
150 150
 
151 151
         return preg_grep($regex, $base_list);
152 152
     }
Please login to merge, or discard this patch.
src/Helpers/UTCDateTimeType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
             self::$utc_timezone
74 74
         );
75 75
 
76
-        if (! $converted) {
76
+        if (!$converted) {
77 77
             throw ConversionException::conversionFailedFormat(
78 78
                 $value,
79 79
                 $this->getName(),
Please login to merge, or discard this patch.
src/Controller/AdminPages/BaseAdminController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                 } catch (AttachmentDownloadException $ex) {
116 116
                     $this->addFlash(
117 117
                         'error',
118
-                        $this->translator->trans('attachment.download_failed') . ' ' . $ex->getMessage()
118
+                        $this->translator->trans('attachment.download_failed').' '.$ex->getMessage()
119 119
                     );
120 120
                 }
121 121
             }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             //Rebuild form, so it is based on the updated data. Important for the parent field!
128 128
             //We can not use dynamic form events here, because the parent entity list is build from database!
129 129
             $form = $this->createForm($this->form_class, $entity, ['attachment_class' => $this->attachment_class]);
130
-        } elseif ($form->isSubmitted() && ! $form->isValid()) {
130
+        } elseif ($form->isSubmitted() && !$form->isValid()) {
131 131
             $this->addFlash('error', $this->translator->trans('entity.edit_flash.invalid'));
132 132
         }
133 133
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
                 } catch (AttachmentDownloadException $ex) {
172 172
                     $this->addFlash(
173 173
                         'error',
174
-                        $this->translator->trans('attachment.download_failed') . ' ' . $ex->getMessage()
174
+                        $this->translator->trans('attachment.download_failed').' '.$ex->getMessage()
175 175
                     );
176 176
                 }
177 177
             }
@@ -180,10 +180,10 @@  discard block
 block discarded – undo
180 180
             $em->flush();
181 181
             $this->addFlash('success', $this->translator->trans('entity.created_flash'));
182 182
 
183
-            return $this->redirectToRoute($this->route_base . '_edit', ['id' => $new_entity->getID()]);
183
+            return $this->redirectToRoute($this->route_base.'_edit', ['id' => $new_entity->getID()]);
184 184
         }
185 185
 
186
-        if ($form->isSubmitted() && ! $form->isValid()) {
186
+        if ($form->isSubmitted() && !$form->isValid()) {
187 187
             $this->addFlash('error', $this->translator->trans('entity.created_flash.invalid'));
188 188
         }
189 189
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
             foreach ($errors as $name => $error) {
205 205
                 /** @var $error ConstraintViolationList */
206
-                $this->addFlash('error', $name . ':' . $error);
206
+                $this->addFlash('error', $name.':'.$error);
207 207
             }
208 208
         }
209 209
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
             //Show errors to user:
223 223
             foreach ($errors as $name => $error) {
224 224
                 /** @var $error ConstraintViolationList */
225
-                $this->addFlash('error', $name . ':' . $error);
225
+                $this->addFlash('error', $name.':'.$error);
226 226
             }
227 227
         }
228 228
 
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
             $this->addFlash('error', 'csfr_invalid');
269 269
         }
270 270
 
271
-        return $this->redirectToRoute($this->route_base .  '_new');
271
+        return $this->redirectToRoute($this->route_base.'_new');
272 272
     }
273 273
 
274 274
     protected function _exportAll(EntityManagerInterface $em, EntityExporter $exporter, Request $request)
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 
280 280
         $entities = $em->getRepository($this->entity_class)->findAll();
281 281
 
282
-        return $exporter->exportEntityFromRequest($entities,$request);
282
+        return $exporter->exportEntityFromRequest($entities, $request);
283 283
     }
284 284
 
285 285
     protected function _exportEntity(NamedDBElement $entity, EntityExporter $exporter, Request $request)
Please login to merge, or discard this patch.
src/DataFixtures/GroupFixtures.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
         $admins->setName('admins');
19 19
         //Perm values taken from Version 1
20 20
         $admins->getPermissions()->setRawPermissionValues([
21
-            'system' => '21','groups' => '1365','users' => '87381','self' => '85','config' => '85',
22
-            'database' => '21','parts' => '1431655765','parts_name' => '5','parts_description' => '5',
23
-            'parts_footprint' => '5','parts_manufacturer' => '5','parts_comment' => '5','parts_order' => '5',
24
-            'parts_orderdetails' => '341','parts_prices' => '341','parts_attachments' => '341','devices' => '5461',
25
-            'devices_parts' => '325','storelocations' => '5461','footprints' => '5461','categories' => '5461',
26
-            'suppliers' => '5461','manufacturers' => '5461','attachment_types' => '1365','tools' => '1365',
27
-            'labels' => '21','parts_category' => '5','parts_minamount' => '5','parts_lots' => '85','parts_tags' => '5',
28
-            'parts_unit' => '5','parts_mass' => '5','parts_status' => '5','parts_mpn' => '5','currencies' => '5461',
21
+            'system' => '21', 'groups' => '1365', 'users' => '87381', 'self' => '85', 'config' => '85',
22
+            'database' => '21', 'parts' => '1431655765', 'parts_name' => '5', 'parts_description' => '5',
23
+            'parts_footprint' => '5', 'parts_manufacturer' => '5', 'parts_comment' => '5', 'parts_order' => '5',
24
+            'parts_orderdetails' => '341', 'parts_prices' => '341', 'parts_attachments' => '341', 'devices' => '5461',
25
+            'devices_parts' => '325', 'storelocations' => '5461', 'footprints' => '5461', 'categories' => '5461',
26
+            'suppliers' => '5461', 'manufacturers' => '5461', 'attachment_types' => '1365', 'tools' => '1365',
27
+            'labels' => '21', 'parts_category' => '5', 'parts_minamount' => '5', 'parts_lots' => '85', 'parts_tags' => '5',
28
+            'parts_unit' => '5', 'parts_mass' => '5', 'parts_status' => '5', 'parts_mpn' => '5', 'currencies' => '5461',
29 29
             'measurement_units' => '5461'
30 30
         ]);
31 31
         $this->setReference(self::ADMINS, $admins);
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
         $readonly = new Group();
35 35
         $readonly->setName('readonly');
36 36
         $readonly->getPermissions()->setRawPermissionValues([
37
-            'system' => '2','groups' => '2730','users' => '43690','self' => '25','config' => '170',
38
-            'database' => '42','parts' => '2778027689','parts_name' => '9','parts_description' => '9',
39
-            'parts_footprint' => '9','parts_manufacturer' => '9','parts_comment' => '9','parts_order' => '9',
40
-            'parts_orderdetails' => '681','parts_prices' => '681','parts_attachments' => '681','devices' => '1705',
41
-            'devices_parts' => '649','storelocations' => '1705','footprints' => '1705','categories' => '1705',
42
-            'suppliers' => '1705','manufacturers' => '1705','attachment_types' => '681','tools' => '1366',
43
-            'labels' => '165','parts_category' => '9','parts_minamount' => '9','parts_lots' => '169','parts_tags' => '9',
44
-            'parts_unit' => '9','parts_mass' => '9','parts_status' => '9','parts_mpn' => '9','currencies' => '9897',
37
+            'system' => '2', 'groups' => '2730', 'users' => '43690', 'self' => '25', 'config' => '170',
38
+            'database' => '42', 'parts' => '2778027689', 'parts_name' => '9', 'parts_description' => '9',
39
+            'parts_footprint' => '9', 'parts_manufacturer' => '9', 'parts_comment' => '9', 'parts_order' => '9',
40
+            'parts_orderdetails' => '681', 'parts_prices' => '681', 'parts_attachments' => '681', 'devices' => '1705',
41
+            'devices_parts' => '649', 'storelocations' => '1705', 'footprints' => '1705', 'categories' => '1705',
42
+            'suppliers' => '1705', 'manufacturers' => '1705', 'attachment_types' => '681', 'tools' => '1366',
43
+            'labels' => '165', 'parts_category' => '9', 'parts_minamount' => '9', 'parts_lots' => '169', 'parts_tags' => '9',
44
+            'parts_unit' => '9', 'parts_mass' => '9', 'parts_status' => '9', 'parts_mpn' => '9', 'currencies' => '9897',
45 45
             'measurement_units' => '9897'
46 46
         ]);
47 47
         $this->setReference(self::READONLY, $readonly);
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
         $users = new Group();
51 51
         $users->setName('users');
52 52
         $users->getPermissions()->setRawPermissionValues([
53
-            'system' => '42','groups' => '2730','users' => '43690','self' => '89','config' => '105',
54
-            'database' => '41','parts' => '1431655765','parts_name' => '5','parts_description' => '5',
55
-            'parts_footprint' => '5','parts_manufacturer' => '5','parts_comment' => '5','parts_order' => '5',
56
-            'parts_orderdetails' => '341','parts_prices' => '341','parts_attachments' => '341','devices' => '5461',
57
-            'devices_parts' => '325','storelocations' => '5461','footprints' => '5461','categories' => '5461',
58
-            'suppliers' => '5461','manufacturers' => '5461','attachment_types' => '1365','tools' => '1365',
59
-            'labels' => '85','parts_category' => '5','parts_minamount' => '5','parts_lots' => '85','parts_tags' => '5',
60
-            'parts_unit' => '5','parts_mass' => '5','parts_status' => '5','parts_mpn' => '5','currencies' => '5461',
53
+            'system' => '42', 'groups' => '2730', 'users' => '43690', 'self' => '89', 'config' => '105',
54
+            'database' => '41', 'parts' => '1431655765', 'parts_name' => '5', 'parts_description' => '5',
55
+            'parts_footprint' => '5', 'parts_manufacturer' => '5', 'parts_comment' => '5', 'parts_order' => '5',
56
+            'parts_orderdetails' => '341', 'parts_prices' => '341', 'parts_attachments' => '341', 'devices' => '5461',
57
+            'devices_parts' => '325', 'storelocations' => '5461', 'footprints' => '5461', 'categories' => '5461',
58
+            'suppliers' => '5461', 'manufacturers' => '5461', 'attachment_types' => '1365', 'tools' => '1365',
59
+            'labels' => '85', 'parts_category' => '5', 'parts_minamount' => '5', 'parts_lots' => '85', 'parts_tags' => '5',
60
+            'parts_unit' => '5', 'parts_mass' => '5', 'parts_status' => '5', 'parts_mpn' => '5', 'currencies' => '5461',
61 61
             'measurement_units' => '5461'
62 62
         ]);
63 63
         $this->setReference(self::USERS, $users);
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
@@ -588,6 +588,6 @@
 block discarded – undo
588 588
     public function __toString()
589 589
     {
590 590
         $tmp = $this->isDisabled() ? ' [DISABLED]' : '';
591
-        return $this->getFullName(true) . $tmp;
591
+        return $this->getFullName(true).$tmp;
592 592
     }
593 593
 }
Please login to merge, or discard this patch.
src/Security/Voter/ExtendedVoter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         $user = $token->getUser();
59 59
 
60 60
         //An allowed user is not allowed to do anything...
61
-        if($user instanceof User && $user->isDisabled()) {
61
+        if ($user instanceof User && $user->isDisabled()) {
62 62
             return false;
63 63
         }
64 64
 
Please login to merge, or discard this patch.
src/Form/AdminPages/AttachmentTypeAdminForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,10 +66,10 @@
 block discarded – undo
66 66
 
67 67
         //Normalize data before writing it to database
68 68
         $builder->get('filetype_filter')->addViewTransformer(new CallbackTransformer(
69
-            function ($value) {
69
+            function($value) {
70 70
                 return $value;
71 71
             },
72
-            function ($value) {
72
+            function($value) {
73 73
                 return $this->filterTools->normalizeFilterString($value);
74 74
             }
75 75
         ));
Please login to merge, or discard this patch.