@@ -171,10 +171,8 @@ discard block |
||
| 171 | 171 | // Quick logic to determine the status |
| 172 | 172 | if (empty($existingStatus)) { |
| 173 | 173 | $existingStatus = (!empty($query['archived']) ? |
| 174 | - OrganizationElement::STATUS_ARCHIVED : |
|
| 175 | - ($query['enabled'] ? |
|
| 176 | - OrganizationElement::STATUS_ENABLED : |
|
| 177 | - OrganizationElement::STATUS_DISABLED |
|
| 174 | + OrganizationElement::STATUS_ARCHIVED : ($query['enabled'] ? |
|
| 175 | + OrganizationElement::STATUS_ENABLED : OrganizationElement::STATUS_DISABLED |
|
| 178 | 176 | ) |
| 179 | 177 | ); |
| 180 | 178 | } |
@@ -449,7 +447,7 @@ discard block |
||
| 449 | 447 | $organization->slug = $request->getBodyParam('slug', $organization->slug); |
| 450 | 448 | |
| 451 | 449 | // Enabled |
| 452 | - $organization->enabledForSite = (bool)$request->getBodyParam( |
|
| 450 | + $organization->enabledForSite = (bool) $request->getBodyParam( |
|
| 453 | 451 | 'enabledForSite', |
| 454 | 452 | $organization->enabledForSite |
| 455 | 453 | ); |
@@ -221,12 +221,12 @@ discard block |
||
| 221 | 221 | 'max' => $this->allowLimit && $this->limit ? $this->limit : null, |
| 222 | 222 | 'tooFew' => Craft::t( |
| 223 | 223 | 'app', |
| 224 | - '{attribute} should contain at least {min, number} '. |
|
| 224 | + '{attribute} should contain at least {min, number} ' . |
|
| 225 | 225 | '{min, plural, one{selection} other{selections}}.' |
| 226 | 226 | ), |
| 227 | 227 | 'tooMany' => Craft::t( |
| 228 | 228 | 'app', |
| 229 | - '{attribute} should contain at most {max, number} '. |
|
| 229 | + '{attribute} should contain at most {max, number} ' . |
|
| 230 | 230 | '{max, plural, one{selection} other{selections}}.' |
| 231 | 231 | ), |
| 232 | 232 | ], |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | $titles = []; |
| 341 | 341 | |
| 342 | 342 | foreach ($value->all() as $relatedElement) { |
| 343 | - $titles[] = (string)$relatedElement; |
|
| 343 | + $titles[] = (string) $relatedElement; |
|
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | return parent::getSearchKeywords($titles, $element); |
@@ -669,8 +669,7 @@ discard block |
||
| 669 | 669 | 'limit' => $this->allowLimit ? $this->limit : null, |
| 670 | 670 | 'viewMode' => $this->viewMode(), |
| 671 | 671 | 'selectionLabel' => $this->selectionLabel ? |
| 672 | - Craft::t('site', $this->selectionLabel) : |
|
| 673 | - static::defaultSelectionLabel() |
|
| 672 | + Craft::t('site', $this->selectionLabel) : static::defaultSelectionLabel() |
|
| 674 | 673 | ]; |
| 675 | 674 | } |
| 676 | 675 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | Event::on( |
| 81 | 81 | User::class, |
| 82 | 82 | User::EVENT_REGISTER_ACTIONS, |
| 83 | - function (RegisterElementActionsEvent $event) { |
|
| 83 | + function(RegisterElementActionsEvent $event) { |
|
| 84 | 84 | if ($event->source == '*') { |
| 85 | 85 | $event->actions = [ |
| 86 | 86 | [ |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | Event::on( |
| 100 | 100 | User::class, |
| 101 | 101 | User::EVENT_REGISTER_SOURCES, |
| 102 | - function (RegisterElementSourcesEvent $event) { |
|
| 102 | + function(RegisterElementSourcesEvent $event) { |
|
| 103 | 103 | if ($event->context == 'index') { |
| 104 | 104 | $event->sources = [ |
| 105 | 105 | [ |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | Event::on( |
| 62 | 62 | Fields::class, |
| 63 | 63 | Fields::EVENT_REGISTER_FIELD_TYPES, |
| 64 | - function (RegisterComponentTypesEvent $event) { |
|
| 64 | + function(RegisterComponentTypesEvent $event) { |
|
| 65 | 65 | $event->types[] = OrganizationField::class; |
| 66 | 66 | $event->types[] = UserField::class; |
| 67 | 67 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | Event::on( |
| 72 | 72 | Elements::class, |
| 73 | 73 | Elements::EVENT_REGISTER_ELEMENT_TYPES, |
| 74 | - function (RegisterComponentTypesEvent $event) { |
|
| 74 | + function(RegisterComponentTypesEvent $event) { |
|
| 75 | 75 | $event->types[] = OrganizationElement::class; |
| 76 | 76 | } |
| 77 | 77 | ); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | Event::on( |
| 88 | 88 | CraftVariable::class, |
| 89 | 89 | CraftVariable::EVENT_INIT, |
| 90 | - function (Event $event) { |
|
| 90 | + function(Event $event) { |
|
| 91 | 91 | /** @var CraftVariable $variable */ |
| 92 | 92 | $variable = $event->sender; |
| 93 | 93 | $variable->set('organization', OrganizationVariable::class); |