@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | $results = []; |
| 195 | 195 | |
| 196 | 196 | foreach ($array as $key => $value) { |
| 197 | - if (is_array($value) && ! empty($value)) { |
|
| 197 | + if (is_array($value) && !empty($value)) { |
|
| 198 | 198 | $results = array_merge($results, $this->dotArray($value, $prepend . $key . '.')); |
| 199 | 199 | } else { |
| 200 | 200 | $results[$prepend . $key] = $value; |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | { |
| 212 | 212 | $bytestotal = 0; |
| 213 | 213 | $path = realpath($path); |
| 214 | - if ($path!==false && $path!=='' && file_exists($path)) { |
|
| 214 | + if ($path !== false && $path !== '' && file_exists($path)) { |
|
| 215 | 215 | foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS)) as $object) { |
| 216 | 216 | $bytestotal += $object->getSize(); |
| 217 | 217 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | /** |
| 24 | 24 | * Ensure vendor libraries exist |
| 25 | 25 | */ |
| 26 | -! is_file($admin_autoload = __DIR__ . '/vendor/autoload.php') and exit('Please run: <i>composer install</i> admin plugin'); |
|
| 26 | +!is_file($admin_autoload = __DIR__ . '/vendor/autoload.php') and exit('Please run: <i>composer install</i> admin plugin'); |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Register The Auto Loader |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | $api_token_dir_path = PATH['project'] . '/tokens' . '/delivery/registry/' . $api_token; |
| 121 | 121 | $api_token_file_path = $api_token_dir_path . '/token.yaml'; |
| 122 | 122 | |
| 123 | - if (! Filesystem::has($api_token_file_path)) { |
|
| 123 | + if (!Filesystem::has($api_token_file_path)) { |
|
| 124 | 124 | |
| 125 | 125 | Filesystem::createDir($api_token_dir_path); |
| 126 | 126 | |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | $api_token_dir_path = PATH['project'] . '/tokens' . '/delivery/entries/' . $api_token; |
| 121 | 121 | $api_token_file_path = $api_token_dir_path . '/token.yaml'; |
| 122 | 122 | |
| 123 | - if (! Filesystem::has($api_token_file_path)) { |
|
| 123 | + if (!Filesystem::has($api_token_file_path)) { |
|
| 124 | 124 | |
| 125 | 125 | Filesystem::createDir($api_token_dir_path); |
| 126 | 126 | |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | $api_token_dir_path = PATH['project'] . '/tokens' . '/images/' . $api_token; |
| 113 | 113 | $api_token_file_path = $api_token_dir_path . '/token.yaml'; |
| 114 | 114 | |
| 115 | - if (! Filesystem::has($api_token_file_path)) { |
|
| 115 | + if (!Filesystem::has($api_token_file_path)) { |
|
| 116 | 116 | |
| 117 | 117 | Filesystem::createDir($api_token_dir_path); |
| 118 | 118 | |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | $api_token_dir_path = PATH['project'] . '/tokens' . '/management/entries/' . $api_token; |
| 121 | 121 | $api_token_file_path = $api_token_dir_path . '/token.yaml'; |
| 122 | 122 | |
| 123 | - if (! Filesystem::has($api_token_file_path)) { |
|
| 123 | + if (!Filesystem::has($api_token_file_path)) { |
|
| 124 | 124 | |
| 125 | 125 | Filesystem::createDir($api_token_dir_path); |
| 126 | 126 | |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | $api_token_dir_path = PATH['project'] . '/tokens' . '/access/' . $api_token; |
| 113 | 113 | $api_token_file_path = $api_token_dir_path . '/token.yaml'; |
| 114 | 114 | |
| 115 | - if (! Filesystem::has($api_token_file_path)) { |
|
| 115 | + if (!Filesystem::has($api_token_file_path)) { |
|
| 116 | 116 | |
| 117 | 117 | Filesystem::createDir($api_token_dir_path); |
| 118 | 118 | |
@@ -32,22 +32,22 @@ |
||
| 32 | 32 | 'menu_item' => 'api', |
| 33 | 33 | 'api_list' => [ |
| 34 | 34 | 'delivery' => [ |
| 35 | - 'title' => __('admin_delivery'), |
|
| 36 | - 'icon' => 'fas fa-truck' |
|
| 35 | + 'title' => __('admin_delivery'), |
|
| 36 | + 'icon' => 'fas fa-truck' |
|
| 37 | 37 | ], |
| 38 | 38 | 'images' => [ |
| 39 | - 'title' => __('admin_images'), |
|
| 40 | - 'icon' => 'far fa-images' |
|
| 39 | + 'title' => __('admin_images'), |
|
| 40 | + 'icon' => 'far fa-images' |
|
| 41 | 41 | ], |
| 42 | 42 | 'management' => [ |
| 43 | - 'title' => __('admin_management'), |
|
| 44 | - 'icon' => 'fas fa-user-cog' |
|
| 43 | + 'title' => __('admin_management'), |
|
| 44 | + 'icon' => 'fas fa-user-cog' |
|
| 45 | 45 | ], |
| 46 | 46 | 'access' => [ |
| 47 | - 'title' => __('admin_access'), |
|
| 48 | - 'icon' => 'fas fa-user-shield' |
|
| 47 | + 'title' => __('admin_access'), |
|
| 48 | + 'icon' => 'fas fa-user-shield' |
|
| 49 | + ], |
|
| 49 | 50 | ], |
| 50 | - ], |
|
| 51 | 51 | 'links' => [ |
| 52 | 52 | 'api' => [ |
| 53 | 53 | 'link' => $this->router->pathFor('admin.api.index'), |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | 'create' => [ |
| 122 | 122 | 'link' => 'javascript:;', |
| 123 | 123 | 'title' => __('admin_create_new_entry'), |
| 124 | - 'onclick' => 'event.preventDefault(); selectEntryType("'.$this->getEntryID($query).'", 0);' |
|
| 124 | + 'onclick' => 'event.preventDefault(); selectEntryType("' . $this->getEntryID($query) . '", 0);' |
|
| 125 | 125 | ] |
| 126 | 126 | ] |
| 127 | 127 | ] |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | $parts = [0 => '']; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | - $type = isset($query['type']) ? $query['type']: ''; |
|
| 151 | + $type = isset($query['type']) ? $query['type'] : ''; |
|
| 152 | 152 | |
| 153 | 153 | return $this->twig->render( |
| 154 | 154 | $response, |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | if ($this->registry->has('plugins.site')) { |
| 247 | 247 | $template_path = PATH['project'] . '/themes/' . $this->registry->get('plugins.site.settings.theme') . '/templates/' . $data['fieldset'] . '.html'; |
| 248 | 248 | $template = (Filesystem::has($template_path)) ? $data['fieldset'] : 'default'; |
| 249 | - $data_from_post['template'] = $template; |
|
| 249 | + $data_from_post['template'] = $template; |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | //foreach ($fieldset['sections'] as $section_name => $section_body) { |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | |
| 288 | 288 | if ($this->entries->create($id, $data_result)) { |
| 289 | 289 | |
| 290 | - if (! Filesystem::has(PATH['project'] . '/uploads' . '/entries/' . $id)) { |
|
| 290 | + if (!Filesystem::has(PATH['project'] . '/uploads' . '/entries/' . $id)) { |
|
| 291 | 291 | Filesystem::createDir(PATH['project'] . '/uploads' . '/entries/' . $id); |
| 292 | 292 | } |
| 293 | 293 | |
@@ -721,7 +721,7 @@ discard block |
||
| 721 | 721 | |
| 722 | 722 | ], |
| 723 | 723 | 'edit_entry' => [ |
| 724 | - 'link' => $this->router->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query). '&type=editor', |
|
| 724 | + 'link' => $this->router->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query) . '&type=editor', |
|
| 725 | 725 | 'title' => __('admin_editor'), |
| 726 | 726 | |
| 727 | 727 | ], |
@@ -872,14 +872,14 @@ discard block |
||
| 872 | 872 | $data = $request->getParsedBody(); |
| 873 | 873 | |
| 874 | 874 | // Delete system fields |
| 875 | - isset($data['slug']) and Arr::delete($data, 'slug'); |
|
| 876 | - isset($data['csrf_value']) and Arr::delete($data, 'csrf_value'); |
|
| 877 | - isset($data['csrf_name']) and Arr::delete($data, 'csrf_name'); |
|
| 878 | - isset($data['form-save-action']) and Arr::delete($data, 'form-save-action'); |
|
| 879 | - isset($data['trumbowyg-icons-path']) and Arr::delete($data, 'trumbowyg-icons-path'); |
|
| 880 | - isset($data['trumbowyg-locale']) and Arr::delete($data, 'trumbowyg-locale'); |
|
| 875 | + isset($data['slug']) and Arr::delete($data, 'slug'); |
|
| 876 | + isset($data['csrf_value']) and Arr::delete($data, 'csrf_value'); |
|
| 877 | + isset($data['csrf_name']) and Arr::delete($data, 'csrf_name'); |
|
| 878 | + isset($data['form-save-action']) and Arr::delete($data, 'form-save-action'); |
|
| 879 | + isset($data['trumbowyg-icons-path']) and Arr::delete($data, 'trumbowyg-icons-path'); |
|
| 880 | + isset($data['trumbowyg-locale']) and Arr::delete($data, 'trumbowyg-locale'); |
|
| 881 | 881 | isset($data['flatpickr-date-format']) and Arr::delete($data, 'flatpickr-date-format'); |
| 882 | - isset($data['flatpickr-locale']) and Arr::delete($data, 'flatpickr-locale'); |
|
| 882 | + isset($data['flatpickr-locale']) and Arr::delete($data, 'flatpickr-locale'); |
|
| 883 | 883 | |
| 884 | 884 | |
| 885 | 885 | $data['published_by'] = Session::get('uuid'); |
@@ -903,7 +903,7 @@ discard block |
||
| 903 | 903 | |
| 904 | 904 | if (isset($data['routable'])) { |
| 905 | 905 | $data['routable'] = (bool) $data['routable']; |
| 906 | - } elseif(isset($entry['routable'])) { |
|
| 906 | + } elseif (isset($entry['routable'])) { |
|
| 907 | 907 | $data['routable'] = (bool) $entry['routable']; |
| 908 | 908 | } else { |
| 909 | 909 | $data['routable'] = true; |