@@ -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 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | Event::on( |
61 | 61 | Fields::class, |
62 | 62 | Fields::EVENT_REGISTER_FIELD_TYPES, |
63 | - function (RegisterComponentTypesEvent $event) { |
|
63 | + function(RegisterComponentTypesEvent $event) { |
|
64 | 64 | $event->types[] = OrganizationField::class; |
65 | 65 | $event->types[] = UserField::class; |
66 | 66 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | Event::on( |
71 | 71 | Elements::class, |
72 | 72 | Elements::EVENT_REGISTER_ELEMENT_TYPES, |
73 | - function (RegisterComponentTypesEvent $event) { |
|
73 | + function(RegisterComponentTypesEvent $event) { |
|
74 | 74 | $event->types[] = OrganizationElement::class; |
75 | 75 | } |
76 | 76 | ); |
@@ -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 | [ |