Passed
Push — master ( fedb78...d4d2de )
by Jan
10:23
created
src/Controller/LogController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
             $this->dbRepository->changeID($element, $logEntry->getTargetID());
147 147
         }
148 148
 
149
-        if (! $element instanceof AbstractDBElement) {
149
+        if (!$element instanceof AbstractDBElement) {
150 150
             $this->addFlash('error', 'log.undo.target_not_found');
151 151
 
152 152
             return;
Please login to merge, or discard this patch.
src/Entity/LogSystem/ElementEditedLogEntry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
 
120 120
     public function hasOldDataInformations(): bool
121 121
     {
122
-        return ! empty($this->extra['d']);
122
+        return !empty($this->extra['d']);
123 123
     }
124 124
 
125 125
     public function getOldData(): array
Please login to merge, or discard this patch.
src/Entity/LogSystem/ElementDeletedLogEntry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
 
110 110
     public function hasOldDataInformations(): bool
111 111
     {
112
-        return ! empty($this->extra['o']);
112
+        return !empty($this->extra['o']);
113 113
     }
114 114
 
115 115
     public function getOldData(): array
Please login to merge, or discard this patch.
src/Entity/Parameters/AbstractParameter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function setElement(AbstractDBElement $element): self
193 193
     {
194
-        if (! is_a($element, static::ALLOWED_ELEMENT_CLASS)) {
194
+        if (!is_a($element, static::ALLOWED_ELEMENT_CLASS)) {
195 195
             throw new InvalidArgumentException(sprintf('The element associated with a %s must be a %s!', static::class, static::ALLOWED_ELEMENT_CLASS));
196 196
         }
197 197
 
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
     protected function formatWithUnit(float $value, string $format = '%g'): string
410 410
     {
411 411
         $str = \sprintf($format, $value);
412
-        if (! empty($this->unit)) {
412
+        if (!empty($this->unit)) {
413 413
             return $str.' '.$this->unit;
414 414
         }
415 415
 
Please login to merge, or discard this patch.
src/Services/StatisticsHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
             'currency' => Currency::class,
104 104
         ];
105 105
 
106
-        if (! isset($arr[$type])) {
106
+        if (!isset($arr[$type])) {
107 107
             throw new \InvalidArgumentException('No count for the given type available!');
108 108
         }
109 109
 
Please login to merge, or discard this patch.
src/Services/LogSystem/EventUndoHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 
44 44
     public function setMode(string $mode): void
45 45
     {
46
-        if (! in_array($mode, self::ALLOWED_MODES, true)) {
46
+        if (!in_array($mode, self::ALLOWED_MODES, true)) {
47 47
             throw new \InvalidArgumentException('Invalid mode passed!');
48 48
         }
49 49
         $this->mode = $mode;
Please login to merge, or discard this patch.
src/Services/LogSystem/TimeTravel.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public function revertEntityToTimestamp(AbstractDBElement $element, \DateTime $timestamp, array $reverted_elements = []): void
81 81
     {
82
-        if (! $element instanceof TimeStampableInterface) {
82
+        if (!$element instanceof TimeStampableInterface) {
83 83
             throw new \InvalidArgumentException('$element must have a Timestamp!');
84 84
         }
85 85
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
                 foreach ($target_elements as $target_element) {
154 154
                     if (null !== $target_element && $element->getLastModified() >= $timestamp) {
155 155
                         //Remove the element from collection, if it did not existed at $timestamp
156
-                        if (! $this->repo->getElementExistedAtTimestamp($target_element, $timestamp)) {
156
+                        if (!$this->repo->getElementExistedAtTimestamp($target_element, $timestamp)) {
157 157
                             if ($target_elements instanceof Collection) {
158 158
                                 $target_elements->removeElement($target_element);
159 159
                             }
@@ -173,10 +173,10 @@  discard block
 block discarded – undo
173 173
     public function applyEntry(AbstractDBElement $element, TimeTravelInterface $logEntry): void
174 174
     {
175 175
         //Skip if this does not provide any info...
176
-        if (! $logEntry->hasOldDataInformations()) {
176
+        if (!$logEntry->hasOldDataInformations()) {
177 177
             return;
178 178
         }
179
-        if (! $element instanceof TimeStampableInterface) {
179
+        if (!$element instanceof TimeStampableInterface) {
180 180
             return;
181 181
         }
182 182
         $metadata = $this->em->getClassMetadata(get_class($element));
Please login to merge, or discard this patch.
src/Services/LogSystem/LogEntryExtraFormatter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                 $str .= '<error>'.$this->translator->trans($key).'</error>: ';
92 92
             }
93 93
             $str .= $value;
94
-            if (! empty($str)) {
94
+            if (!empty($str)) {
95 95
                 $tmp[] = $str;
96 96
             }
97 97
         }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 $str .= '<b>'.$this->translator->trans($key).'</b>: ';
117 117
             }
118 118
             $str .= $value;
119
-            if (! empty($str)) {
119
+            if (!empty($str)) {
120 120
                 $tmp[] = $str;
121 121
             }
122 122
         }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                 '%s <i class="fas fa-long-arrow-alt-right"></i> %s (%s)',
187 187
                 $context->getOldInstock(),
188 188
                 $context->getNewInstock(),
189
-                (! $context->isWithdrawal() ? '+' : '-').$context->getDifference(true)
189
+                (!$context->isWithdrawal() ? '+' : '-').$context->getDifference(true)
190 190
             );
191 191
             $array['log.instock_changed.comment'] = htmlspecialchars($context->getComment());
192 192
         }
Please login to merge, or discard this patch.
src/Form/AdminPages/BaseEntityAdminForm.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -94,14 +94,14 @@  discard block
 block discarded – undo
94 94
                 'attr' => [
95 95
                     'placeholder' => 'part.name.placeholder',
96 96
                 ],
97
-                'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
97
+                'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
98 98
             ])
99 99
 
100 100
             ->add('parent', StructuralEntityType::class, [
101 101
                 'class' => get_class($entity),
102 102
                 'required' => false,
103 103
                 'label' => 'parent.label',
104
-                'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'move', $entity),
104
+                'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity),
105 105
             ])
106 106
 
107 107
             ->add('not_selectable', CheckboxType::class, [
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                 'label_attr' => [
112 112
                     'class' => 'checkbox-custom',
113 113
                 ],
114
-                'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
114
+                'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
115 115
             ])
116 116
 
117 117
             ->add('comment', CKEditorType::class, [
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                     'rows' => 4,
123 123
                 ],
124 124
                 'help' => 'bbcode.hint',
125
-                'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
125
+                'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
126 126
             ]);
127 127
 
128 128
         $this->additionalFormElements($builder, $options, $entity);
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             'allow_add' => true,
134 134
             'allow_delete' => true,
135 135
             'label' => false,
136
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
136
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
137 137
             'entry_options' => [
138 138
                 'data_class' => $options['attachment_class'],
139 139
             ],
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
         $builder->add('master_picture_attachment', MasterPictureAttachmentType::class, [
144 144
             'required' => false,
145
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
145
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
146 146
             'label' => 'part.edit.master_attachment',
147 147
             'entity' => $entity,
148 148
         ]);
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
             'entry_type' => ParameterType::class,
159 159
             'allow_add' => $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
160 160
             'allow_delete' => $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
161
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
161
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
162 162
             'label' => false,
163 163
             'by_reference' => false,
164 164
             'prototype_data' => new $options['parameter_class'](),
@@ -173,11 +173,11 @@  discard block
 block discarded – undo
173 173
             'attr' => [
174 174
                 'class' => $is_new ? 'btn-success' : '',
175 175
             ],
176
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
176
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
177 177
         ])
178 178
             ->add('reset', ResetType::class, [
179 179
                 'label' => 'entity.edit.reset',
180
-                'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
180
+                'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
181 181
             ]);
182 182
     }
183 183
 
Please login to merge, or discard this patch.