Passed
Push — dev ( e1774e...4b2406 )
by Sergey
05:06 queued 13s
created
app/Controllers/ToolsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
app/Controllers/ApiImagesController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Controllers/ApiAccessController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
dependencies.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@
 block discarded – undo
33 33
 $_admin_js  = ($flextype['registry']->has('assets.admin.js')) ? $flextype['registry']->get('assets.admin.js') : [];
34 34
 
35 35
 $flextype['registry']->set('assets.admin.css',
36
-                           array_merge($_admin_css,
37
-                           ['project/plugins/admin/assets/dist/css/admin-vendor-build.min.css',
36
+                            array_merge($_admin_css,
37
+                            ['project/plugins/admin/assets/dist/css/admin-vendor-build.min.css',
38 38
                             'project/plugins/admin/assets/dist/css/admin-build.min.css']));
39 39
 
40 40
 $flextype['registry']->set('assets.admin.js',
41
-                       array_merge($_admin_js,
42
-                       ['project/plugins/admin/assets/dist/js/admin-vendor-build.min.js']));
41
+                        array_merge($_admin_js,
42
+                        ['project/plugins/admin/assets/dist/js/admin-vendor-build.min.js']));
43 43
 
44 44
 $flextype['DashboardController'] = static function ($container) {
45 45
     return new DashboardController($container);
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
 
32 32
 // Add Admin Navigation
33 33
 $flextype->registry->set('plugins.admin.settings.navigation.content.entries', ['title' => __('admin_entries'), 'icon' => 'fas fa-database', 'link' => $flextype->router->pathFor('admin.entries.index')]);
34
-$flextype->registry->set('plugins.admin.settings.navigation.extends.plugins', ['title' => __('admin_plugins'),'icon' => 'fas fa-plug', 'link' => $flextype->router->pathFor('admin.plugins.index')]);
35
-$flextype->registry->set('plugins.admin.settings.navigation.system.tools', ['title' => __('admin_tools'),'icon' => 'fas fa-toolbox', 'link' => $flextype->router->pathFor('admin.tools.index')]);
36
-$flextype->registry->set('plugins.admin.settings.navigation.system.api', ['title' => __('admin_api'),'icon' => 'fas fa-network-wired', 'link' => $flextype->router->pathFor('admin.api.index')]);
34
+$flextype->registry->set('plugins.admin.settings.navigation.extends.plugins', ['title' => __('admin_plugins'), 'icon' => 'fas fa-plug', 'link' => $flextype->router->pathFor('admin.plugins.index')]);
35
+$flextype->registry->set('plugins.admin.settings.navigation.system.tools', ['title' => __('admin_tools'), 'icon' => 'fas fa-toolbox', 'link' => $flextype->router->pathFor('admin.tools.index')]);
36
+$flextype->registry->set('plugins.admin.settings.navigation.system.api', ['title' => __('admin_api'), 'icon' => 'fas fa-network-wired', 'link' => $flextype->router->pathFor('admin.api.index')]);
37 37
 
38 38
 /**
39 39
  * Add Assets
@@ -50,50 +50,50 @@  discard block
 block discarded – undo
50 50
                        array_merge($_admin_js,
51 51
                        ['project/plugins/admin/assets/dist/js/admin-vendor-build.min.js']));
52 52
 
53
-$flextype['DashboardController'] = static function ($container) {
53
+$flextype['DashboardController'] = static function($container) {
54 54
     return new DashboardController($container);
55 55
 };
56 56
 
57
-$flextype['SettingsController'] = static function ($container) {
57
+$flextype['SettingsController'] = static function($container) {
58 58
     return new SettingsController($container);
59 59
 };
60 60
 
61
-$flextype['PluginsController'] = static function ($container) {
61
+$flextype['PluginsController'] = static function($container) {
62 62
     return new PluginsController($container);
63 63
 };
64 64
 
65
-$flextype['EntriesController'] = static function ($container) {
65
+$flextype['EntriesController'] = static function($container) {
66 66
     return new EntriesController($container);
67 67
 };
68 68
 
69
-$flextype['ToolsController'] = static function ($container) {
69
+$flextype['ToolsController'] = static function($container) {
70 70
     return new ToolsController($container);
71 71
 };
72 72
 
73
-$flextype['ApiController'] = static function ($container) {
73
+$flextype['ApiController'] = static function($container) {
74 74
     return new ApiController($container);
75 75
 };
76 76
 
77
-$flextype['ApiEntriesController'] = static function ($container) {
77
+$flextype['ApiEntriesController'] = static function($container) {
78 78
     return new ApiEntriesController($container);
79 79
 };
80 80
 
81
-$flextype['ApiFilesController'] = static function ($container) {
81
+$flextype['ApiFilesController'] = static function($container) {
82 82
     return new ApiFilesController($container);
83 83
 };
84 84
 
85
-$flextype['ApiFoldersController'] = static function ($container) {
85
+$flextype['ApiFoldersController'] = static function($container) {
86 86
     return new ApiFoldersController($container);
87 87
 };
88 88
 
89
-$flextype['ApiImagesController'] = static function ($container) {
89
+$flextype['ApiImagesController'] = static function($container) {
90 90
     return new ApiImagesController($container);
91 91
 };
92 92
 
93
-$flextype['ApiAccessController'] = static function ($container) {
93
+$flextype['ApiAccessController'] = static function($container) {
94 94
     return new ApiAccessController($container);
95 95
 };
96 96
 
97
-$flextype['ApiRegistryController'] = static function ($container) {
97
+$flextype['ApiRegistryController'] = static function($container) {
98 98
     return new ApiRegistryController($container);
99 99
 };
Please login to merge, or discard this patch.
app/Controllers/ApiEntriesController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Controllers/ApiController.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -33,30 +33,30 @@
 block discarded – undo
33 33
                 'menu_item' => 'api',
34 34
                 'api_list' => [
35 35
                                 'entries' => [
36
-                                  'title' => __('admin_entries'),
37
-                                  'icon' => 'fas fa-database'
36
+                                    'title' => __('admin_entries'),
37
+                                    'icon' => 'fas fa-database'
38 38
                                 ],
39 39
                                 'registry' => [
40
-                                  'title' => __('admin_registry'),
41
-                                  'icon' => 'fas fa-archive'
40
+                                    'title' => __('admin_registry'),
41
+                                    'icon' => 'fas fa-archive'
42 42
                                 ],
43 43
                                 'images' => [
44
-                                  'title' => __('admin_images'),
45
-                                  'icon' => 'far fa-images'
44
+                                    'title' => __('admin_images'),
45
+                                    'icon' => 'far fa-images'
46 46
                                 ],
47 47
                                 'files' => [
48
-                                  'title' => __('admin_files'),
49
-                                  'icon' => 'fas fa-file'
48
+                                    'title' => __('admin_files'),
49
+                                    'icon' => 'fas fa-file'
50 50
                                 ],
51 51
                                 'folders' => [
52
-                                  'title' => __('admin_folders'),
53
-                                  'icon' => 'fas fa-folder'
52
+                                    'title' => __('admin_folders'),
53
+                                    'icon' => 'fas fa-folder'
54 54
                                 ],
55 55
                                 'access' => [
56
-                                  'title' => __('admin_access'),
57
-                                  'icon' => 'fas fa-user-shield'
56
+                                    'title' => __('admin_access'),
57
+                                    'icon' => 'fas fa-user-shield'
58
+                                ],
58 59
                                 ],
59
-                               ],
60 60
                 'links' =>  [
61 61
                     'api' => [
62 62
                         'link' => $this->router->pathFor('admin.api.index'),
Please login to merge, or discard this patch.
app/Controllers/EntriesController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
 
718 718
                             ],
719 719
                             'edit_entry' => [
720
-                                'link' => $this->router->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query). '&type=editor',
720
+                                'link' => $this->router->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query) . '&type=editor',
721 721
                                 'title' => __('admin_editor'),
722 722
 
723 723
                             ],
@@ -868,14 +868,14 @@  discard block
 block discarded – undo
868 868
             $data = $request->getParsedBody();
869 869
 
870 870
             // Delete system fields
871
-            isset($data['slug'])                  and Arrays::delete($data, 'slug');
872
-            isset($data['csrf_value'])            and Arrays::delete($data, 'csrf_value');
873
-            isset($data['csrf_name'])             and Arrays::delete($data, 'csrf_name');
874
-            isset($data['form-save-action'])      and Arrays::delete($data, 'form-save-action');
875
-            isset($data['trumbowyg-icons-path'])  and Arrays::delete($data, 'trumbowyg-icons-path');
876
-            isset($data['trumbowyg-locale'])      and Arrays::delete($data, 'trumbowyg-locale');
871
+            isset($data['slug']) and Arrays::delete($data, 'slug');
872
+            isset($data['csrf_value']) and Arrays::delete($data, 'csrf_value');
873
+            isset($data['csrf_name']) and Arrays::delete($data, 'csrf_name');
874
+            isset($data['form-save-action']) and Arrays::delete($data, 'form-save-action');
875
+            isset($data['trumbowyg-icons-path']) and Arrays::delete($data, 'trumbowyg-icons-path');
876
+            isset($data['trumbowyg-locale']) and Arrays::delete($data, 'trumbowyg-locale');
877 877
             isset($data['flatpickr-date-format']) and Arrays::delete($data, 'flatpickr-date-format');
878
-            isset($data['flatpickr-locale'])      and Arrays::delete($data, 'flatpickr-locale');
878
+            isset($data['flatpickr-locale']) and Arrays::delete($data, 'flatpickr-locale');
879 879
 
880 880
 
881 881
             $data['published_by'] = Session::get('uuid');
@@ -899,7 +899,7 @@  discard block
 block discarded – undo
899 899
 
900 900
             if (isset($data['routable'])) {
901 901
                 $data['routable'] = (bool) $data['routable'];
902
-            } elseif(isset($entry['routable'])) {
902
+            } elseif (isset($entry['routable'])) {
903 903
                 $data['routable'] = (bool) $entry['routable'];
904 904
             } else {
905 905
                 $data['routable'] = true;
Please login to merge, or discard this patch.
app/Controllers/ApiFoldersController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
         $api_token_dir_path  = PATH['project'] . '/tokens/folders/' . $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
 
Please login to merge, or discard this patch.