Passed
Pull Request — dev (#103)
by Sergey
10:25 queued 05:00
created
app/Controllers/ToolsController.php 2 patches
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.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,15 +24,15 @@
 block discarded – undo
24 24
     /**
25 25
      * Flextype Application
26 26
      */
27
-     protected $flextype;
27
+        protected $flextype;
28 28
 
29 29
     /**
30 30
      * __construct
31 31
      */
32
-     public function __construct($flextype)
33
-     {
34
-         $this->flextype = $flextype;
35
-     }
32
+        public function __construct($flextype)
33
+        {
34
+            $this->flextype = $flextype;
35
+        }
36 36
 
37 37
     /**
38 38
      * Index page
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 2 patches
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.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,15 +20,15 @@
 block discarded – undo
20 20
     /**
21 21
      * Flextype Application
22 22
      */
23
-     protected $flextype;
23
+        protected $flextype;
24 24
 
25 25
     /**
26 26
      * __construct
27 27
      */
28
-     public function __construct($flextype)
29
-     {
30
-         $this->flextype = $flextype;
31
-     }
28
+        public function __construct($flextype)
29
+        {
30
+            $this->flextype = $flextype;
31
+        }
32 32
 
33 33
     /**
34 34
      * Images Index page
Please login to merge, or discard this patch.
app/Controllers/ApiEntriesController.php 2 patches
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.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,15 +21,15 @@
 block discarded – undo
21 21
     /**
22 22
      * Flextype Application
23 23
      */
24
-     protected $flextype;
24
+        protected $flextype;
25 25
 
26 26
     /**
27 27
      * __construct
28 28
      */
29
-     public function __construct($flextype)
30
-     {
31
-         $this->flextype = $flextype;
32
-     }
29
+        public function __construct($flextype)
30
+        {
31
+            $this->flextype = $flextype;
32
+        }
33 33
 
34 34
     /**
35 35
      * Entries Index page
Please login to merge, or discard this patch.
app/Controllers/ApiFoldersController.php 2 patches
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.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,15 +20,15 @@
 block discarded – undo
20 20
     /**
21 21
      * Flextype Application
22 22
      */
23
-     protected $flextype;
23
+        protected $flextype;
24 24
 
25 25
     /**
26 26
      * __construct
27 27
      */
28
-     public function __construct($flextype)
29
-     {
30
-         $this->flextype = $flextype;
31
-     }
28
+        public function __construct($flextype)
29
+        {
30
+            $this->flextype = $flextype;
31
+        }
32 32
      
33 33
     /**
34 34
      * folders Index page
Please login to merge, or discard this patch.
app/Controllers/ApiRegistryController.php 2 patches
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/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
 
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,15 +20,15 @@
 block discarded – undo
20 20
     /**
21 21
      * Flextype Application
22 22
      */
23
-     protected $flextype;
23
+        protected $flextype;
24 24
 
25 25
     /**
26 26
      * __construct
27 27
      */
28
-     public function __construct($flextype)
29
-     {
30
-         $this->flextype = $flextype;
31
-     }
28
+        public function __construct($flextype)
29
+        {
30
+            $this->flextype = $flextype;
31
+        }
32 32
      
33 33
     /**
34 34
      * Registry Index page
Please login to merge, or discard this patch.
app/Controllers/ApiFilesController.php 2 patches
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/files/' . $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.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,15 +22,15 @@
 block discarded – undo
22 22
     /**
23 23
      * Flextype Application
24 24
      */
25
-     protected $flextype;
25
+        protected $flextype;
26 26
 
27 27
     /**
28 28
      * __construct
29 29
      */
30
-     public function __construct($flextype)
31
-     {
32
-         $this->flextype = $flextype;
33
-     }
30
+        public function __construct($flextype)
31
+        {
32
+            $this->flextype = $flextype;
33
+        }
34 34
 
35 35
     /**
36 36
      * files Index page
Please login to merge, or discard this patch.
app/Controllers/EntriesController.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@
 block discarded – undo
17 17
     /**
18 18
      * Flextype Application
19 19
      */
20
-     protected $flextype;
20
+        protected $flextype;
21 21
 
22 22
     /**
23 23
      * __construct
24 24
      */
25
-     public function __construct($flextype)
26
-     {
27
-         $this->flextype = $flextype;
28
-     }
25
+        public function __construct($flextype)
26
+        {
27
+            $this->flextype = $flextype;
28
+        }
29 29
 
30 30
     /**
31 31
      * Get Entry ID
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                                         'create' => [
131 131
                                                 'link'    => 'javascript:;',
132 132
                                                 'title'   => __('admin_create_new_entry'),
133
-                                                'onclick' => 'event.preventDefault(); selectEntryType("'.$this->getEntryID($query).'", 0);'
133
+                                                'onclick' => 'event.preventDefault(); selectEntryType("' . $this->getEntryID($query) . '", 0);'
134 134
                                             ]
135 135
                                         ]
136 136
                             ]
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
             $parts = [0 => ''];
158 158
         }
159 159
 
160
-        $type = isset($query['type']) ? $query['type']: '';
160
+        $type = isset($query['type']) ? $query['type'] : '';
161 161
 
162 162
         return $this->flextype->container('twig')->render(
163 163
             $response,
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
                 if ($this->flextype->container('registry')->has('plugins.site')) {
259 259
                     $template_path = PATH['project'] . '/themes/' . $this->flextype->container('registry')->get('plugins.site.settings.theme') . '/templates/' . $data['fieldset'] . '.html';
260 260
                     $template = (Filesystem::has($template_path)) ? $data['fieldset'] : 'default';
261
-                    $data_from_post['template']   = $template;
261
+                    $data_from_post['template'] = $template;
262 262
                 }
263 263
 
264 264
                 //foreach ($fieldset['sections'] as $section_name => $section_body) {
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
 
736 736
                             ],
737 737
                             'edit_entry' => [
738
-                                'link' => $this->flextype->container('router')->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query). '&type=editor',
738
+                                'link' => $this->flextype->container('router')->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query) . '&type=editor',
739 739
                                 'title' => __('admin_editor'),
740 740
 
741 741
                             ],
@@ -888,15 +888,15 @@  discard block
 block discarded – undo
888 888
             $data = $request->getParsedBody();
889 889
 
890 890
             // Delete system fields
891
-            isset($data['slug'])                  and Arrays::delete($data, 'slug');
892
-            isset($data['id'])                    and Arrays::delete($data, 'id');
893
-            isset($data['csrf_value'])            and Arrays::delete($data, 'csrf_value');
894
-            isset($data['csrf_name'])             and Arrays::delete($data, 'csrf_name');
895
-            isset($data['form-save-action'])      and Arrays::delete($data, 'form-save-action');
896
-            isset($data['trumbowyg-icons-path'])  and Arrays::delete($data, 'trumbowyg-icons-path');
897
-            isset($data['trumbowyg-locale'])      and Arrays::delete($data, 'trumbowyg-locale');
891
+            isset($data['slug']) and Arrays::delete($data, 'slug');
892
+            isset($data['id']) and Arrays::delete($data, 'id');
893
+            isset($data['csrf_value']) and Arrays::delete($data, 'csrf_value');
894
+            isset($data['csrf_name']) and Arrays::delete($data, 'csrf_name');
895
+            isset($data['form-save-action']) and Arrays::delete($data, 'form-save-action');
896
+            isset($data['trumbowyg-icons-path']) and Arrays::delete($data, 'trumbowyg-icons-path');
897
+            isset($data['trumbowyg-locale']) and Arrays::delete($data, 'trumbowyg-locale');
898 898
             isset($data['flatpickr-date-format']) and Arrays::delete($data, 'flatpickr-date-format');
899
-            isset($data['flatpickr-locale'])      and Arrays::delete($data, 'flatpickr-locale');
899
+            isset($data['flatpickr-locale']) and Arrays::delete($data, 'flatpickr-locale');
900 900
 
901 901
 
902 902
             $data['published_by'] = Session::get('uuid');
@@ -921,7 +921,7 @@  discard block
 block discarded – undo
921 921
 
922 922
             if (isset($data['routable'])) {
923 923
                 $data['routable'] = (bool) $data['routable'];
924
-            } elseif(isset($entry['routable'])) {
924
+            } elseif (isset($entry['routable'])) {
925 925
                 $data['routable'] = (bool) $entry['routable'];
926 926
             } else {
927 927
                 $data['routable'] = true;
Please login to merge, or discard this patch.
app/Controllers/ApiController.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -21,15 +21,15 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * Flextype Application
23 23
      */
24
-     protected $flextype;
24
+        protected $flextype;
25 25
 
26 26
     /**
27 27
      * __construct
28 28
      */
29
-     public function __construct($flextype)
30
-     {
31
-         $this->flextype = $flextype;
32
-     }
29
+        public function __construct($flextype)
30
+        {
31
+            $this->flextype = $flextype;
32
+        }
33 33
 
34 34
     /**
35 35
      * Index page for API's
@@ -46,30 +46,30 @@  discard block
 block discarded – undo
46 46
                 'menu_item' => 'api',
47 47
                 'api_list' => [
48 48
                                 'entries' => [
49
-                                  'title' => __('admin_entries'),
50
-                                  'icon' => 'fas fa-database'
49
+                                    'title' => __('admin_entries'),
50
+                                    'icon' => 'fas fa-database'
51 51
                                 ],
52 52
                                 'registry' => [
53
-                                  'title' => __('admin_registry'),
54
-                                  'icon' => 'fas fa-archive'
53
+                                    'title' => __('admin_registry'),
54
+                                    'icon' => 'fas fa-archive'
55 55
                                 ],
56 56
                                 'images' => [
57
-                                  'title' => __('admin_images'),
58
-                                  'icon' => 'far fa-images'
57
+                                    'title' => __('admin_images'),
58
+                                    'icon' => 'far fa-images'
59 59
                                 ],
60 60
                                 'files' => [
61
-                                  'title' => __('admin_files'),
62
-                                  'icon' => 'fas fa-file'
61
+                                    'title' => __('admin_files'),
62
+                                    'icon' => 'fas fa-file'
63 63
                                 ],
64 64
                                 'folders' => [
65
-                                  'title' => __('admin_folders'),
66
-                                  'icon' => 'fas fa-folder'
65
+                                    'title' => __('admin_folders'),
66
+                                    'icon' => 'fas fa-folder'
67 67
                                 ],
68 68
                                 'access' => [
69
-                                  'title' => __('admin_access'),
70
-                                  'icon' => 'fas fa-user-shield'
69
+                                    'title' => __('admin_access'),
70
+                                    'icon' => 'fas fa-user-shield'
71
+                                ],
71 72
                                 ],
72
-                               ],
73 73
                 'links' =>  [
74 74
                     'api' => [
75 75
                         'link' => $this->flextype->container('router')->pathFor('admin.api.index'),
Please login to merge, or discard this patch.