Passed
Push — master ( 092f39...163762 )
by M. Mikkel
03:04
created
src/migrations/Install.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         return true;
53 53
     }
54 54
 
55
-   /**
55
+    /**
56 56
      * @inheritdoc
57 57
      */
58 58
     public function safeDown()
Please login to merge, or discard this patch.
src/Reasons.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         Event::on(
89 89
             Plugins::class,
90 90
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
91
-            function (PluginEvent $event) {
91
+            function(PluginEvent $event) {
92 92
                 if ($event->plugin === $this) {
93 93
                     $this->reasons->clearCache();
94 94
                 }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         Event::on(
99 99
             Plugins::class,
100 100
             Plugins::EVENT_AFTER_UNINSTALL_PLUGIN,
101
-            function (PluginEvent $event) {
101
+            function(PluginEvent $event) {
102 102
                 if ($event->plugin === $this) {
103 103
                     $this->reasons->clearCache();
104 104
                     Craft::$app->getProjectConfig()->remove('reasons_conditionals');
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         Event::on(
111 111
             Fields::class,
112 112
             Fields::EVENT_AFTER_SAVE_FIELD_LAYOUT,
113
-            function (FieldLayoutEvent $event) {
113
+            function(FieldLayoutEvent $event) {
114 114
                 if (Craft::$app->getRequest()->getIsConsoleRequest()) {
115 115
                     return;
116 116
                 }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         Event::on(
142 142
             Fields::class,
143 143
             Fields::EVENT_AFTER_DELETE_FIELD_LAYOUT,
144
-            function (FieldLayoutEvent $event) {
144
+            function(FieldLayoutEvent $event) {
145 145
                 $fieldLayout = $event->layout;
146 146
                 if (!$fieldLayout) {
147 147
                     return;
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         Event::on(
231 231
             View::class,
232 232
             View::EVENT_BEFORE_RENDER_TEMPLATE,
233
-            function (/** @scrutinizer ignore-unused */ TemplateEvent $event) {
233
+            function(/** @scrutinizer ignore-unused */ TemplateEvent $event) {
234 234
                 try {
235 235
                     Craft::$app->getView()->registerAssetBundle(ReasonsAssetBundle::class);
236 236
                 } catch (InvalidConfigException $e) {
Please login to merge, or discard this patch.
src/migrations/m200603_004000_projectconfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,8 @@
 block discarded – undo
70 70
             } else {
71 71
                 $targetFieldUid = $targetFieldIdOrUid;
72 72
             }
73
-            $return[$targetFieldUid] = \array_map(function (array $rules) {
74
-                return \array_map(function (array $rule) {
73
+            $return[$targetFieldUid] = \array_map(function(array $rules) {
74
+                return \array_map(function(array $rule) {
75 75
                     $fieldIdOrUid = $rule['fieldId'] ?? $rule['field'];
76 76
                     if (!StringHelper::isUUID($fieldIdOrUid)) {
77 77
                         $fieldUid = Db::uidById(Table::FIELDS, $fieldIdOrUid);
Please login to merge, or discard this patch.
src/services/ReasonsService.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -319,8 +319,8 @@  discard block
 block discarded – undo
319 319
         foreach ($conditionals as $targetFieldId => $statements) {
320 320
             $targetFieldId = (int)$targetFieldId;
321 321
             $targetFieldUid = $this->getFieldUidById($targetFieldId);
322
-            $return[$targetFieldUid] = \array_map(function (array $rules) {
323
-                return \array_map(function (array $rule) {
322
+            $return[$targetFieldUid] = \array_map(function(array $rules) {
323
+                return \array_map(function(array $rule) {
324 324
                     $fieldId = (int)$rule['fieldId'];
325 325
                     return [
326 326
                         'field' => $this->getFieldUidById($fieldId),
@@ -347,8 +347,8 @@  discard block
 block discarded – undo
347 347
             $conditionals = Json::decodeIfJson($conditionals);
348 348
             foreach ($conditionals as $targetFieldUid => $statements) {
349 349
                 $targetFieldId = $this->getFieldIdByUid($targetFieldUid);
350
-                $return["$targetFieldId"] = \array_map(function (array $rules) {
351
-                    return \array_map(function (array $rule) {
350
+                $return["$targetFieldId"] = \array_map(function(array $rules) {
351
+                    return \array_map(function(array $rule) {
352 352
                         $fieldUid = $rule['field'];
353 353
                         return [
354 354
                             'fieldId' => $this->getFieldIdByUid($fieldUid),
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
     {
519 519
         if (!isset($this->allFields)) {
520 520
             $globalFields = Craft::$app->getFields()->getAllFields('global');
521
-            $this->allFields = \array_filter($globalFields, function (FieldInterface $field) {
521
+            $this->allFields = \array_filter($globalFields, function(FieldInterface $field) {
522 522
                 return $field instanceof Field;
523 523
             });
524 524
         }
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
     {
536 536
         if (!isset($this->fieldUidsById)) {
537 537
             $allFields = $this->getAllFields();
538
-            $this->fieldUidsById = \array_reduce($allFields, function (array $carry, Field $field) {
538
+            $this->fieldUidsById = \array_reduce($allFields, function(array $carry, Field $field) {
539 539
                 $carry["{$field->id}"] = $field->uid;
540 540
                 return $carry;
541 541
             }, []);
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
     {
554 554
         if (!isset($this->fieldIdsByUid)) {
555 555
             $allFields = $this->getAllFields();
556
-            $this->fieldIdsByUid = \array_reduce($allFields, function (array $carry, Field $field) {
556
+            $this->fieldIdsByUid = \array_reduce($allFields, function(array $carry, Field $field) {
557 557
                 $carry[$field->uid] = (int)$field->id;
558 558
                 return $carry;
559 559
             }, []);
Please login to merge, or discard this patch.