Passed
Push — master ( 9273d6...3d5492 )
by Jan
05:16
created
src/Services/Formatters/MarkdownParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     {
50 50
         return sprintf(
51 51
             '<div class="markdown %s" data-markdown="%s" data-controller="common--markdown">%s</div>',
52
-            $inline_mode ? 'markdown-inline' : '',  //Add class if inline mode is enabled, to prevent margin after p
52
+            $inline_mode ? 'markdown-inline' : '', //Add class if inline mode is enabled, to prevent margin after p
53 53
             htmlspecialchars($markdown),
54 54
             $this->translator->trans('markdown.loading')
55 55
         );
Please login to merge, or discard this patch.
src/Doctrine/SQLiteRegexExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
             $native_connection = $connection->getNativeConnection();
42 42
 
43 43
             //Ensure that the function really exists on the connection, as it is marked as experimental according to PHP documentation
44
-            if($native_connection instanceof \PDO && method_exists($native_connection, 'sqliteCreateFunction' )) {
45
-                $native_connection->sqliteCreateFunction('REGEXP', function ($pattern, $value) {
44
+            if ($native_connection instanceof \PDO && method_exists($native_connection, 'sqliteCreateFunction')) {
45
+                $native_connection->sqliteCreateFunction('REGEXP', function($pattern, $value) {
46 46
                     return (false !== mb_ereg($pattern, $value)) ? 1 : 0;
47 47
                 });
48 48
             }
Please login to merge, or discard this patch.
src/Doctrine/SetSQLMode/SetSQLModeMiddlewareDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function connect(array $params): \Doctrine\DBAL\Driver\Connection
33 33
     {
34 34
         //Only set this on MySQL connections, as other databases don't support this parameter
35
-        if($this->getDatabasePlatform() instanceof AbstractMySQLPlatform) {
35
+        if ($this->getDatabasePlatform() instanceof AbstractMySQLPlatform) {
36 36
             //1002 is \PDO::MYSQL_ATTR_INIT_COMMAND constant value
37 37
             $params['driverOptions'][1002] = 'SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode, \'ONLY_FULL_GROUP_BY\', \'\'))';
38 38
         }
Please login to merge, or discard this patch.
src/Entity/UserSystem/PermissionData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             unset($this->data[$permission][$operation]);
166 166
         } else {
167 167
             //Otherwise, set the pemission value
168
-            if(!isset($this->data[$permission])) {
168
+            if (!isset($this->data[$permission])) {
169 169
                 $this->data[$permission] = [];
170 170
             }
171 171
             $this->data[$permission][$operation] = $value;
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
                 continue;
217 217
             }
218 218
 
219
-            $ret[$permission] = array_filter($operations, function ($value) {
219
+            $ret[$permission] = array_filter($operations, function($value) {
220 220
                 return $value !== null;
221 221
             });
222 222
 
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
@@ -704,7 +704,7 @@
 block discarded – undo
704 704
      */
705 705
     public function isGoogleAuthenticatorEnabled(): bool
706 706
     {
707
-        return (bool)$this->googleAuthenticatorSecret;
707
+        return (bool) $this->googleAuthenticatorSecret;
708 708
     }
709 709
 
710 710
     /**
Please login to merge, or discard this patch.
src/Entity/ProjectSystem/ProjectBOMEntry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@
 block discarded – undo
290 290
         }
291 291
 
292 292
         //Check that the number of mountnames is the same as the (rounded) quantity
293
-        if (!empty($this->mountnames) && count($uniq_mountnames) !== (int) round ($this->quantity)) {
293
+        if (!empty($this->mountnames) && count($uniq_mountnames) !== (int) round($this->quantity)) {
294 294
             $context->buildViolation('project.bom_entry.mountnames_quantity_mismatch')
295 295
                 ->atPath('mountnames')
296 296
                 ->addViolation();
Please login to merge, or discard this patch.
src/Entity/Parts/PartTraits/OrderTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,8 +104,8 @@
 block discarded – undo
104 104
     {
105 105
         //If needed hide the obsolete entries
106 106
         if ($hide_obsolete) {
107
-            return $this->orderdetails->filter(function (Orderdetail $orderdetail) {
108
-                return ! $orderdetail->getObsolete();
107
+            return $this->orderdetails->filter(function(Orderdetail $orderdetail) {
108
+                return !$orderdetail->getObsolete();
109 109
             });
110 110
         }
111 111
 
Please login to merge, or discard this patch.
src/Entity/Parts/PartTraits/ProjectTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
     {
73 73
         $projects = [];
74 74
 
75
-        foreach($this->project_bom_entries as $entry) {
75
+        foreach ($this->project_bom_entries as $entry) {
76 76
             $projects[] = $entry->getProject();
77 77
         }
78 78
 
Please login to merge, or discard this patch.
src/DataTables/LogDataTable.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $optionsResolver->setAllowedTypes('mode', 'string');
91 91
         $optionsResolver->setAllowedTypes('filter', ['null', LogFilter::class]);
92 92
 
93
-        $optionsResolver->setNormalizer('filter_elements', static function (Options $options, $value) {
93
+        $optionsResolver->setNormalizer('filter_elements', static function(Options $options, $value) {
94 94
             if (!is_array($value)) {
95 95
                 return [$value];
96 96
             }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
         //This special $$rowClass column is used to set the row class depending on the log level. The class gets set by the frontend controller
111 111
         $dataTable->add('dont_matter', RowClassColumn::class, [
112
-            'render' => static function ($value, AbstractLogEntry $context) {
112
+            'render' => static function($value, AbstractLogEntry $context) {
113 113
                 switch ($context->getLevel()) {
114 114
                     case AbstractLogEntry::LEVEL_EMERGENCY:
115 115
                     case AbstractLogEntry::LEVEL_ALERT:
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $dataTable->add('symbol', TextColumn::class, [
130 130
             'label' => '',
131 131
             'className' => 'no-colvis',
132
-            'render' => static function ($value, AbstractLogEntry $context) {
132
+            'render' => static function($value, AbstractLogEntry $context) {
133 133
                 switch ($context->getLevelString()) {
134 134
                     case LogLevel::DEBUG:
135 135
                         $symbol = 'fa-bug';
@@ -190,13 +190,13 @@  discard block
 block discarded – undo
190 190
         $dataTable->add('type', TextColumn::class, [
191 191
             'label' => $this->translator->trans('log.type'),
192 192
             'propertyPath' => 'type',
193
-            'render' => function (string $value, AbstractLogEntry $context) {
193
+            'render' => function(string $value, AbstractLogEntry $context) {
194 194
                 $text = $this->translator->trans('log.type.'.$value);
195 195
 
196 196
                 if ($context instanceof PartStockChangedLogEntry) {
197 197
                     $text .= sprintf(
198 198
                         ' (<i>%s</i>)',
199
-                        $this->translator->trans('log.part_stock_changed.' . $context->getInstockChangeType())
199
+                        $this->translator->trans('log.part_stock_changed.'.$context->getInstockChangeType())
200 200
                     );
201 201
                 }
202 202
 
@@ -208,14 +208,14 @@  discard block
 block discarded – undo
208 208
             'label' => $this->translator->trans('log.level'),
209 209
             'visible' => 'system_log' === $options['mode'],
210 210
             'propertyPath' => 'levelString',
211
-            'render' => function (string $value, AbstractLogEntry $context) {
211
+            'render' => function(string $value, AbstractLogEntry $context) {
212 212
                 return $this->translator->trans('log.level.'.$value);
213 213
             },
214 214
         ]);
215 215
 
216 216
         $dataTable->add('user', TextColumn::class, [
217 217
             'label' => $this->translator->trans('log.user'),
218
-            'render' => function ($value, AbstractLogEntry $context) {
218
+            'render' => function($value, AbstractLogEntry $context) {
219 219
                 $user = $context->getUser();
220 220
 
221 221
                 //If user was deleted, show the info from the username field
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
         $dataTable->add('target_type', TextColumn::class, [
239 239
             'label' => $this->translator->trans('log.target_type'),
240 240
             'visible' => false,
241
-            'render' => function ($value, AbstractLogEntry $context) {
241
+            'render' => function($value, AbstractLogEntry $context) {
242 242
                 $class = $context->getTargetClass();
243 243
                 if (null !== $class) {
244 244
                     return $this->elementTypeNameGenerator->getLocalizedTypeLabel($class);
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         $dataTable->add('timeTravel', IconLinkColumn::class, [
261 261
             'label' => '',
262 262
             'icon' => 'fas fa-fw fa-eye',
263
-            'href' => function ($value, AbstractLogEntry $context) {
263
+            'href' => function($value, AbstractLogEntry $context) {
264 264
                 if (
265 265
                     ($context instanceof TimeTravelInterface
266 266
                         && $context->hasOldDataInformations())
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 
279 279
                 return null;
280 280
             },
281
-            'disabled' => function ($value, AbstractLogEntry $context) {
281
+            'disabled' => function($value, AbstractLogEntry $context) {
282 282
                 return !$this->security->isGranted('show_history', $context->getTargetClass());
283 283
             },
284 284
         ]);
@@ -291,11 +291,11 @@  discard block
 block discarded – undo
291 291
 
292 292
         $dataTable->createAdapter(ORMAdapter::class, [
293 293
             'entity' => AbstractLogEntry::class,
294
-            'query' => function (QueryBuilder $builder) use ($options): void {
294
+            'query' => function(QueryBuilder $builder) use ($options): void {
295 295
                 $this->getQuery($builder, $options);
296 296
             },
297 297
             'criteria' => [
298
-                function (QueryBuilder $builder) use ($options): void {
298
+                function(QueryBuilder $builder) use ($options): void {
299 299
                     $this->buildCriteria($builder, $options);
300 300
                 },
301 301
                 new SearchCriteriaProvider(),
Please login to merge, or discard this patch.