Passed
Push — master ( 490f70...21cf97 )
by Jan
15:26
created
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/Type/CurrencyEntityType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         // This options allows you to override the currency shown for the null value
73 73
         $resolver->setDefault('base_currency', null);
74 74
 
75
-        $resolver->setDefault('empty_message', function (Options $options) {
75
+        $resolver->setDefault('empty_message', function(Options $options) {
76 76
             //By default we use the global base currency:
77 77
             $iso_code = $this->base_currency;
78 78
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     {
89 89
         //Similar to StructuralEntityType, but we use the currency symbol instead if available
90 90
 
91
-        if (! $choice instanceof Currency) {
91
+        if (!$choice instanceof Currency) {
92 92
             throw new \InvalidArgumentException('$choice must be an currency object!');
93 93
         }
94 94
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         /** @var Currency $choice */
118 118
         $tmp = [];
119 119
 
120
-        if (! empty($choice->getIsoCode())) {
120
+        if (!empty($choice->getIsoCode())) {
121 121
             //Show the name of the currency
122 122
             $tmp += ['data-subtext' => $choice->getName()];
123 123
         }
Please login to merge, or discard this patch.
src/Repository/LogEntryRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@
 block discarded – undo
171 171
         $query = $qb->getQuery();
172 172
         $count = $query->getSingleScalarResult();
173 173
 
174
-        return ! ($count > 0);
174
+        return !($count > 0);
175 175
     }
176 176
 
177 177
     /**
Please login to merge, or discard this patch.
src/DataTables/Column/LogEntryTargetColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
         $tmp = '';
99 99
 
100 100
         //The element is existing
101
-        if ($target instanceof NamedElementInterface && ! empty($target->getName())) {
101
+        if ($target instanceof NamedElementInterface && !empty($target->getName())) {
102 102
             try {
103 103
                 $tmp = sprintf(
104 104
                     '<a href="%s">%s</a>',
Please login to merge, or discard this patch.
src/Services/EntityURLGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -381,7 +381,7 @@
 block discarded – undo
381 381
         $class = get_class($entity);
382 382
 
383 383
         //Check if we have an direct mapping for the given class
384
-        if (! array_key_exists($class, $map)) {
384
+        if (!array_key_exists($class, $map)) {
385 385
             //Check if we need to check inheritance by looping through our map
386 386
             foreach (array_keys($map) as $key) {
387 387
                 if (is_a($entity, $key)) {
Please login to merge, or discard this patch.