@@ -199,9 +199,9 @@ |
||
199 | 199 | // query for the fields myself because otherwise it will mess up the users field layout |
200 | 200 | $fields = (new Query()) |
201 | 201 | ->select([ |
202 | - 'fields.id', |
|
203 | - 'fields.handle', |
|
204 | - ]) |
|
202 | + 'fields.id', |
|
203 | + 'fields.handle', |
|
204 | + ]) |
|
205 | 205 | ->from(['{{%fields}} fields']) |
206 | 206 | ->where(['context' => 'global']) |
207 | 207 | ->orderBy(['fields.name' => SORT_ASC, 'fields.handle' => SORT_ASC]) |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | // this is hacky and ugly but I don't know an alternative... we can't populate the user yet ¯\_(ツ)_/¯ |
90 | 90 | $session = Craft::$app->getSession(); |
91 | 91 | $id = $session->getHasSessionId() || $session->getIsActive() ? $session->get(Craft::$app->getUser()->idParam) : null; |
92 | - if(empty($id) === true){ |
|
92 | + if (empty($id) === true) { |
|
93 | 93 | return; |
94 | 94 | } |
95 | 95 | $isAdmin = (new Query()) |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | ->from(Table::USERS) |
98 | 98 | ->where(['id' => $id]) |
99 | 99 | ->scalar(); |
100 | - if((bool)$isAdmin === false){ |
|
100 | + if ((bool) $isAdmin === false) { |
|
101 | 101 | return; |
102 | 102 | } |
103 | 103 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | Event::on( |
106 | 106 | Plugins::class, |
107 | 107 | Plugins::EVENT_AFTER_LOAD_PLUGINS, |
108 | - function () { |
|
108 | + function() { |
|
109 | 109 | $this->doIt(); |
110 | 110 | } |
111 | 111 | ); |
@@ -184,9 +184,9 @@ discard block |
||
184 | 184 | $sectionIds = Craft::$app->getSections()->getAllSectionIds(); |
185 | 185 | foreach ($sectionIds as $sectionId) { |
186 | 186 | $entryTypes = Craft::$app->getSections()->getEntryTypesBySectionId($sectionId); |
187 | - $data['entryTypeIds'][(string)$sectionId] = []; |
|
187 | + $data['entryTypeIds'][(string) $sectionId] = []; |
|
188 | 188 | foreach ($entryTypes as $entryType) { |
189 | - $data['entryTypeIds'][(string)$sectionId][] = $entryType->id; |
|
189 | + $data['entryTypeIds'][(string) $sectionId][] = $entryType->id; |
|
190 | 190 | } |
191 | 191 | } |
192 | 192 |