Passed
Push — master ( fe0f69...67a0dc )
by Jan
04:33
created
src/Controller/AdminPages/BaseAdminController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $form->handleRequest($request);
84 84
         if ($form->isSubmitted() && $form->isValid()) {
85 85
             //Check if we editing a user and if we need to change the password of it
86
-            if ($entity instanceof User && ! empty($form['new_password']->getData())) {
86
+            if ($entity instanceof User && !empty($form['new_password']->getData())) {
87 87
                 $password = $this->passwordEncoder->encodePassword($entity, $form['new_password']->getData());
88 88
                 $entity->setPassword($password);
89 89
                 //By default the user must change the password afterwards
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             //Rebuild form, so it is based on the updated data. Important for the parent field!
117 117
             //We can not use dynamic form events here, because the parent entity list is build from database!
118 118
             $form = $this->createForm($this->form_class, $entity, ['attachment_class' => $this->attachment_class]);
119
-        } elseif ($form->isSubmitted() && ! $form->isValid()) {
119
+        } elseif ($form->isSubmitted() && !$form->isValid()) {
120 120
             $this->addFlash('error', 'entity.edit_flash.invalid');
121 121
         }
122 122
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         $form->handleRequest($request);
141 141
 
142 142
         if ($form->isSubmitted() && $form->isValid()) {
143
-            if ($new_entity instanceof User && ! empty($form['new_password']->getData())) {
143
+            if ($new_entity instanceof User && !empty($form['new_password']->getData())) {
144 144
                 $password = $this->passwordEncoder->encodePassword($new_entity, $form['new_password']->getData());
145 145
                 $new_entity->setPassword($password);
146 146
                 //By default the user must change the password afterwards
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
             return $this->redirectToRoute($this->route_base.'_edit', ['id' => $new_entity->getID()]);
174 174
         }
175 175
 
176
-        if ($form->isSubmitted() && ! $form->isValid()) {
176
+        if ($form->isSubmitted() && !$form->isValid()) {
177 177
             $this->addFlash('error', 'entity.created_flash.invalid');
178 178
         }
179 179
 
Please login to merge, or discard this patch.
src/DataFixtures/DataStructureFixtures.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
      */
71 71
     public function createNodesForClass(string $class, ObjectManager $manager): void
72 72
     {
73
-        if (! new $class() instanceof StructuralDBElement) {
73
+        if (!new $class() instanceof StructuralDBElement) {
74 74
             throw new \InvalidArgumentException('$class must be a StructuralDBElement!');
75 75
         }
76 76
 
Please login to merge, or discard this patch.
src/Helpers/Trees/StructuralDBElementIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         /** @var StructuralDBElement $element */
39 39
         $element = $this->current();
40 40
 
41
-        return ! empty($element->getSubelements());
41
+        return !empty($element->getSubelements());
42 42
     }
43 43
 
44 44
     public function getChildren()
Please login to merge, or discard this patch.
src/Helpers/Trees/TreeViewNodeIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         /** @var TreeViewNode $element */
40 40
         $element = $this->current();
41 41
 
42
-        return ! empty($element->getNodes());
42
+        return !empty($element->getNodes());
43 43
     }
44 44
 
45 45
     public function getChildren()
Please login to merge, or discard this patch.
src/Helpers/UTCDateTimeType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
     public function convertToDatabaseValue($value, AbstractPlatform $platform)
40 40
     {
41
-        if (! self::$utc_timezone) {
41
+        if (!self::$utc_timezone) {
42 42
             self::$utc_timezone = new \DateTimeZone('UTC');
43 43
         }
44 44
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function convertToPHPValue($value, AbstractPlatform $platform)
53 53
     {
54
-        if (! self::$utc_timezone) {
54
+        if (!self::$utc_timezone) {
55 55
             self::$utc_timezone = new \DateTimeZone('UTC');
56 56
         }
57 57
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             self::$utc_timezone
66 66
         );
67 67
 
68
-        if (! $converted) {
68
+        if (!$converted) {
69 69
             throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getDateTimeFormatString());
70 70
         }
71 71
 
Please login to merge, or discard this patch.
src/Security/UserChecker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
      */
54 54
     public function checkPostAuth(UserInterface $user): void
55 55
     {
56
-        if (! $user instanceof User) {
56
+        if (!$user instanceof User) {
57 57
             return;
58 58
         }
59 59
 
Please login to merge, or discard this patch.
src/Security/EntityListeners/ElementPermissionListener.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             );
96 96
 
97 97
             //Check if user is allowed to read info, otherwise apply placeholder
98
-            if ((null !== $annotation) && ! $this->isGranted('read', $annotation, $element)) {
98
+            if ((null !== $annotation) && !$this->isGranted('read', $annotation, $element)) {
99 99
                 $property->setAccessible(true);
100 100
                 $value = $annotation->getPlaceholder();
101 101
 
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
                 $property->setAccessible(true);
144 144
 
145 145
                 //If the user is not allowed to edit or read this property, reset all values.
146
-                if ((! $this->isGranted('read', $annotation, $element)
147
-                    || ! $this->isGranted('edit', $annotation, $element))) {
146
+                if ((!$this->isGranted('read', $annotation, $element)
147
+                    || !$this->isGranted('edit', $annotation, $element))) {
148 148
                     //Set value to old value, so that there a no change to this property
149 149
                     if (isset($old_data[$property->getName()])) {
150 150
                         $property->setValue($element, $old_data[$property->getName()]);
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      */
168 168
     protected function isRunningFromCLI()
169 169
     {
170
-        if (empty($_SERVER['REMOTE_ADDR']) && ! isset($_SERVER['HTTP_USER_AGENT']) && \count($_SERVER['argv']) > 0) {
170
+        if (empty($_SERVER['REMOTE_ADDR']) && !isset($_SERVER['HTTP_USER_AGENT']) && \count($_SERVER['argv']) > 0) {
171 171
             return true;
172 172
         }
173 173
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         }
201 201
 
202 202
         //Check if we have already have saved the permission, otherwise save it to cache
203
-        if (! isset($this->perm_cache[$mode][\get_class($element)][$operation])) {
203
+        if (!isset($this->perm_cache[$mode][\get_class($element)][$operation])) {
204 204
             $this->perm_cache[$mode][\get_class($element)][$operation] = $this->security->isGranted($operation, $element);
205 205
         }
206 206
 
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
         }
59 59
 
60 60
         // if the user is anonymous, we use the anonymous user.
61
-        if (! $user instanceof User) {
61
+        if (!$user instanceof User) {
62 62
             $repo = $this->entityManager->getRepository(User::class);
63 63
             $user = $repo->getAnonymousUser();
64 64
             if (null === $user) {
Please login to merge, or discard this patch.
src/Form/Part/OrderdetailType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         ]);
80 80
 
81 81
         //Add pricedetails after we know the data, so we can set the default currency
82
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($options): void {
82
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($options): void {
83 83
             /** @var Orderdetail $orderdetail */
84 84
             $orderdetail = $event->getData();
85 85
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                 'prototype_data' => $dummy_pricedetail,
98 98
                 'by_reference' => false,
99 99
                 'entry_options' => [
100
-                    'disabled' => ! $this->security->isGranted('@parts_prices.edit'),
100
+                    'disabled' => !$this->security->isGranted('@parts_prices.edit'),
101 101
                     'measurement_unit' => $options['measurement_unit'],
102 102
                 ],
103 103
             ]);
Please login to merge, or discard this patch.