@@ -69,8 +69,8 @@ |
||
| 69 | 69 | } else { |
| 70 | 70 | $targetFieldUid = $targetFieldIdOrUid; |
| 71 | 71 | } |
| 72 | - $return[$targetFieldUid] = \array_map(function (array $rules) { |
|
| 73 | - return \array_map(function (array $rule) { |
|
| 72 | + $return[$targetFieldUid] = \array_map(function(array $rules) { |
|
| 73 | + return \array_map(function(array $rule) { |
|
| 74 | 74 | $fieldIdOrUid = $rule['fieldId'] ?? $rule['field']; |
| 75 | 75 | if (!StringHelper::isUUID($fieldIdOrUid)) { |
| 76 | 76 | $fieldUid = Db::uidById('{{%fields}}', $fieldIdOrUid); |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | return true; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - /** |
|
| 55 | + /** |
|
| 56 | 56 | * @inheritdoc |
| 57 | 57 | */ |
| 58 | 58 | public function safeDown() |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | Event::on( |
| 88 | 88 | Plugins::class, |
| 89 | 89 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
| 90 | - function (PluginEvent $event) { |
|
| 90 | + function(PluginEvent $event) { |
|
| 91 | 91 | if ($event->plugin === $this) { |
| 92 | 92 | $this->reasons->clearCache(); |
| 93 | 93 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | Event::on( |
| 98 | 98 | Plugins::class, |
| 99 | 99 | Plugins::EVENT_AFTER_UNINSTALL_PLUGIN, |
| 100 | - function (PluginEvent $event) { |
|
| 100 | + function(PluginEvent $event) { |
|
| 101 | 101 | if ($event->plugin === $this) { |
| 102 | 102 | $this->reasons->clearCache(); |
| 103 | 103 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | Event::on( |
| 109 | 109 | Fields::class, |
| 110 | 110 | Fields::EVENT_AFTER_SAVE_FIELD_LAYOUT, |
| 111 | - function (FieldLayoutEvent $event) { |
|
| 111 | + function(FieldLayoutEvent $event) { |
|
| 112 | 112 | $conditionals = Craft::$app->getRequest()->getBodyParam('_reasons', null); |
| 113 | 113 | if ($conditionals === null) { |
| 114 | 114 | return; |
@@ -213,12 +213,12 @@ discard block |
||
| 213 | 213 | Event::on( |
| 214 | 214 | View::class, |
| 215 | 215 | View::EVENT_BEFORE_RENDER_TEMPLATE, |
| 216 | - function (TemplateEvent $event) { |
|
| 216 | + function(TemplateEvent $event) { |
|
| 217 | 217 | try { |
| 218 | 218 | Craft::$app->getView()->registerAssetBundle(ReasonsAssetBundle::class); |
| 219 | 219 | } catch (InvalidConfigException $e) { |
| 220 | 220 | Craft::error( |
| 221 | - 'Error registering AssetBundle - '.$e->getMessage(), |
|
| 221 | + 'Error registering AssetBundle - ' . $e->getMessage(), |
|
| 222 | 222 | __METHOD__ |
| 223 | 223 | ); |
| 224 | 224 | } |
@@ -256,8 +256,8 @@ discard block |
||
| 256 | 256 | $conditionals = Json::decodeIfJson($conditionals); |
| 257 | 257 | foreach ($conditionals as $targetFieldId => $statements) { |
| 258 | 258 | $targetFieldUid = Db::uidById('{{%fields}}', $targetFieldId); |
| 259 | - $return[$targetFieldUid] = \array_map(function (array $rules) { |
|
| 260 | - return \array_map(function (array $rule) { |
|
| 259 | + $return[$targetFieldUid] = \array_map(function(array $rules) { |
|
| 260 | + return \array_map(function(array $rule) { |
|
| 261 | 261 | return [ |
| 262 | 262 | 'field' => Db::uidById('{{%fields}}', $rule['fieldId']), |
| 263 | 263 | 'compare' => $rule['compare'], |
@@ -282,8 +282,8 @@ discard block |
||
| 282 | 282 | $conditionals = Json::decodeIfJson($conditionals); |
| 283 | 283 | foreach ($conditionals as $targetFieldUid => $statements) { |
| 284 | 284 | $targetFieldId = Db::idByUid('{{%fields}}', $targetFieldUid); |
| 285 | - $return[$targetFieldId] = \array_map(function (array $rules) { |
|
| 286 | - return \array_map(function (array $rule) { |
|
| 285 | + $return[$targetFieldId] = \array_map(function(array $rules) { |
|
| 286 | + return \array_map(function(array $rule) { |
|
| 287 | 287 | return [ |
| 288 | 288 | 'fieldId' => Db::idByUid('{{%fields}}', $rule['field']), |
| 289 | 289 | 'compare' => $rule['compare'], |