@@ -166,7 +166,7 @@ |
||
| 166 | 166 | throw new \InvalidArgumentException("A parameter is empty for [$key][$filepath][$section]"); // @codeCoverageIgnore |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | - if( $section === POST_SECTION) { |
|
| 169 | + if ($section === POST_SECTION) { |
|
| 170 | 170 | $uriDateStringTagList = $this->getPostUriDateStringAndTagListFromIndexKey($key); |
| 171 | 171 | $typeCatUsername = $this->getTypeCategoryUsernameFromFilepath($filepath); |
| 172 | 172 | return $this->createElementClass($uriDateStringTagList[0], $filepath, POST_SECTION, type: $typeCatUsername[0], category: $typeCatUsername[1], username: $typeCatUsername[2], timestamp: $uriDateStringTagList[1], tags: $uriDateStringTagList[2]); |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | if (isset($routes[$method])) { |
| 18 | 18 | $content = admin_get_content_object($method, $uri, $routes); |
| 19 | 19 | } else { |
| 20 | - throw new InternalException("Unsupported HTTP Method [$method]"); |
|
| 20 | + throw new InternalException("Unsupported HTTP Method [$method]"); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | return $content; |
@@ -5,25 +5,25 @@ |
||
| 5 | 5 | |
| 6 | 6 | return [ |
| 7 | 7 | HTTP_GET => [ |
| 8 | - ADMIN_DASHBOARD_KEY => (object) [ |
|
| 8 | + ADMIN_DASHBOARD_KEY => (object)[ |
|
| 9 | 9 | 'cb' => 'get_dashboard_view_content_object' |
| 10 | 10 | ], |
| 11 | - CAT_INDEX_KEY => (object) [ |
|
| 11 | + CAT_INDEX_KEY => (object)[ |
|
| 12 | 12 | 'cb' => 'get_category_listview_content_object' |
| 13 | 13 | ], |
| 14 | - CAT_INDEX_KEY.FWD_SLASH.ADMIN_ACTION_EDIT => (object) [ |
|
| 14 | + CAT_INDEX_KEY.FWD_SLASH.ADMIN_ACTION_EDIT => (object)[ |
|
| 15 | 15 | 'cb' => 'get_category_edit_object' |
| 16 | 16 | ], |
| 17 | - CAT_INDEX_KEY.FWD_SLASH.ADMIN_ACTION_ADD => (object) [ |
|
| 17 | + CAT_INDEX_KEY.FWD_SLASH.ADMIN_ACTION_ADD => (object)[ |
|
| 18 | 18 | 'cb' => 'get_category_add_content_object' |
| 19 | 19 | ], |
| 20 | - CAT_INDEX_KEY.FWD_SLASH.ADMIN_ACTION_DELETE => (object) [ |
|
| 20 | + CAT_INDEX_KEY.FWD_SLASH.ADMIN_ACTION_DELETE => (object)[ |
|
| 21 | 21 | 'cb' => 'get_category_delete_object' |
| 22 | 22 | ] |
| 23 | 23 | ], |
| 24 | 24 | HTTP_POST => [ |
| 25 | - CAT_INDEX_KEY => (object) [ |
|
| 26 | - 'cb' => function (array $data): \stdClass { |
|
| 25 | + CAT_INDEX_KEY => (object)[ |
|
| 26 | + 'cb' => function(array $data): \stdClass { |
|
| 27 | 27 | if (empty($data[ADMIN_ACTION_CANCEL]) === false) { |
| 28 | 28 | header('Location: '.get_config()->getString(Config::KEY_SITE_URL).FWD_SLASH.$data[ADMIN_CONTEXT_STR].FWD_SLASH.'category'); |
| 29 | 29 | return new \stdClass(); |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | if (empty($formData[ADMIN_KEY_STR]) || $formData[ADMIN_KEY_STR] === 'category/') { |
| 106 | 106 | $formData[ADMIN_KEY_STR] = 'category/'.URLify::slug($formData['title']); |
| 107 | 107 | } |
| 108 | - if (get_index_manager()->elementExists( $formData[ADMIN_KEY_STR])) { |
|
| 108 | + if (get_index_manager()->elementExists($formData[ADMIN_KEY_STR])) { |
|
| 109 | 109 | $formData['fielderror'] = ADMIN_KEY_STR; |
| 110 | 110 | return false; |
| 111 | 111 | } |