@@ -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 | } |
@@ -12,10 +12,10 @@ |
||
| 12 | 12 | /** |
| 13 | 13 | * __construct |
| 14 | 14 | */ |
| 15 | - public function __construct() |
|
| 16 | - { |
|
| 15 | + public function __construct() |
|
| 16 | + { |
|
| 17 | 17 | |
| 18 | - } |
|
| 18 | + } |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Index page |
@@ -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 |
@@ -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 | |
@@ -20,10 +20,10 @@ |
||
| 20 | 20 | /** |
| 21 | 21 | * __construct |
| 22 | 22 | */ |
| 23 | - public function __construct() |
|
| 24 | - { |
|
| 23 | + public function __construct() |
|
| 24 | + { |
|
| 25 | 25 | |
| 26 | - } |
|
| 26 | + } |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Images Index page |
@@ -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 | |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | $api_token_dir_path = PATH['project'] . '/tokens/entries/' . $api_token; |
| 114 | 114 | $api_token_file_path = $api_token_dir_path . '/token.yaml'; |
| 115 | 115 | |
| 116 | - if (! Filesystem::has($api_token_file_path)) { |
|
| 116 | + if (!Filesystem::has($api_token_file_path)) { |
|
| 117 | 117 | |
| 118 | 118 | Filesystem::createDir($api_token_dir_path); |
| 119 | 119 | |
@@ -22,10 +22,10 @@ |
||
| 22 | 22 | /** |
| 23 | 23 | * __construct |
| 24 | 24 | */ |
| 25 | - public function __construct() |
|
| 26 | - { |
|
| 25 | + public function __construct() |
|
| 26 | + { |
|
| 27 | 27 | |
| 28 | - } |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Entries Index page |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | $api_token_dir_path = PATH['project'] . '/tokens/registry/' . $api_token; |
| 114 | 114 | $api_token_file_path = $api_token_dir_path . '/token.yaml'; |
| 115 | 115 | |
| 116 | - if (! Filesystem::has($api_token_file_path)) { |
|
| 116 | + if (!Filesystem::has($api_token_file_path)) { |
|
| 117 | 117 | |
| 118 | 118 | Filesystem::createDir($api_token_dir_path); |
| 119 | 119 | |
@@ -20,10 +20,10 @@ |
||
| 20 | 20 | /** |
| 21 | 21 | * __construct |
| 22 | 22 | */ |
| 23 | - public function __construct() |
|
| 24 | - { |
|
| 23 | + public function __construct() |
|
| 24 | + { |
|
| 25 | 25 | |
| 26 | - } |
|
| 26 | + } |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Registry Index page |
@@ -12,10 +12,10 @@ |
||
| 12 | 12 | /** |
| 13 | 13 | * __construct |
| 14 | 14 | */ |
| 15 | - public function __construct() |
|
| 16 | - { |
|
| 15 | + public function __construct() |
|
| 16 | + { |
|
| 17 | 17 | |
| 18 | - } |
|
| 18 | + } |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Index page |
@@ -20,10 +20,10 @@ |
||
| 20 | 20 | /** |
| 21 | 21 | * __construct |
| 22 | 22 | */ |
| 23 | - public function __construct() |
|
| 24 | - { |
|
| 23 | + public function __construct() |
|
| 24 | + { |
|
| 25 | 25 | |
| 26 | - } |
|
| 26 | + } |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * folders Index page |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | $api_token_dir_path = PATH['project'] . '/tokens/media/folders/' . $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 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | 'create' => [ |
| 130 | 130 | 'link' => 'javascript:;', |
| 131 | 131 | 'title' => __('admin_create_new_entry'), |
| 132 | - 'onclick' => 'event.preventDefault(); selectEntryType("'.$this->getEntryID($query).'", 0);' |
|
| 132 | + 'onclick' => 'event.preventDefault(); selectEntryType("' . $this->getEntryID($query) . '", 0);' |
|
| 133 | 133 | ] |
| 134 | 134 | ] |
| 135 | 135 | ] |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $parts = [0 => '']; |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - $type = isset($query['type']) ? $query['type']: ''; |
|
| 159 | + $type = isset($query['type']) ? $query['type'] : ''; |
|
| 160 | 160 | |
| 161 | 161 | return flextype('twig')->render( |
| 162 | 162 | $response, |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | if (flextype('registry')->has('plugins.site')) { |
| 258 | 258 | $template_path = PATH['project'] . '/themes/' . flextype('registry')->get('plugins.site.settings.theme') . '/templates/' . $data['fieldset'] . '.html'; |
| 259 | 259 | $template = (Filesystem::has($template_path)) ? $data['fieldset'] : 'default'; |
| 260 | - $data_from_post['template'] = $template; |
|
| 260 | + $data_from_post['template'] = $template; |
|
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | //foreach ($fieldset['sections'] as $section_name => $section_body) { |
@@ -740,7 +740,7 @@ discard block |
||
| 740 | 740 | |
| 741 | 741 | ], |
| 742 | 742 | 'edit_entry' => [ |
| 743 | - 'link' => flextype('router')->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query). '&type=editor', |
|
| 743 | + 'link' => flextype('router')->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query) . '&type=editor', |
|
| 744 | 744 | 'title' => __('admin_editor'), |
| 745 | 745 | |
| 746 | 746 | ], |
@@ -893,15 +893,15 @@ discard block |
||
| 893 | 893 | $data = $request->getParsedBody(); |
| 894 | 894 | |
| 895 | 895 | // Delete system fields |
| 896 | - isset($data['slug']) and Arrays::delete($data, 'slug'); |
|
| 897 | - isset($data['id']) and Arrays::delete($data, 'id'); |
|
| 898 | - isset($data['csrf_value']) and Arrays::delete($data, 'csrf_value'); |
|
| 899 | - isset($data['csrf_name']) and Arrays::delete($data, 'csrf_name'); |
|
| 900 | - isset($data['form-save-action']) and Arrays::delete($data, 'form-save-action'); |
|
| 901 | - isset($data['trumbowyg-icons-path']) and Arrays::delete($data, 'trumbowyg-icons-path'); |
|
| 902 | - isset($data['trumbowyg-locale']) and Arrays::delete($data, 'trumbowyg-locale'); |
|
| 896 | + isset($data['slug']) and Arrays::delete($data, 'slug'); |
|
| 897 | + isset($data['id']) and Arrays::delete($data, 'id'); |
|
| 898 | + isset($data['csrf_value']) and Arrays::delete($data, 'csrf_value'); |
|
| 899 | + isset($data['csrf_name']) and Arrays::delete($data, 'csrf_name'); |
|
| 900 | + isset($data['form-save-action']) and Arrays::delete($data, 'form-save-action'); |
|
| 901 | + isset($data['trumbowyg-icons-path']) and Arrays::delete($data, 'trumbowyg-icons-path'); |
|
| 902 | + isset($data['trumbowyg-locale']) and Arrays::delete($data, 'trumbowyg-locale'); |
|
| 903 | 903 | isset($data['flatpickr-date-format']) and Arrays::delete($data, 'flatpickr-date-format'); |
| 904 | - isset($data['flatpickr-locale']) and Arrays::delete($data, 'flatpickr-locale'); |
|
| 904 | + isset($data['flatpickr-locale']) and Arrays::delete($data, 'flatpickr-locale'); |
|
| 905 | 905 | |
| 906 | 906 | $data['published_by'] = flextype('acl')->getUserLoggedInUuid(); |
| 907 | 907 | |
@@ -932,7 +932,7 @@ discard block |
||
| 932 | 932 | |
| 933 | 933 | if (isset($data['routable'])) { |
| 934 | 934 | $data['routable'] = (bool) $data['routable']; |
| 935 | - } elseif(isset($entry['routable'])) { |
|
| 935 | + } elseif (isset($entry['routable'])) { |
|
| 936 | 936 | $data['routable'] = (bool) $entry['routable']; |
| 937 | 937 | } else { |
| 938 | 938 | $data['routable'] = true; |
@@ -897,7 +897,7 @@ |
||
| 897 | 897 | |
| 898 | 898 | $data['published_by'] = flextype('acl')->getUserLoggedInUuid(); |
| 899 | 899 | |
| 900 | - //$entry2 = flextype('entries')->fetch($id)->toArray(); |
|
| 900 | + //$entry2 = flextype('entries')->fetch($id)->toArray(); |
|
| 901 | 901 | |
| 902 | 902 | $entry = flextype('serializers') |
| 903 | 903 | ->frontmatter() |