Passed
Push — dev ( 7dc72d...e34479 )
by Sergey
10:12
created
app/Controllers/EntriesController.php 1 patch
Spacing   +13 added lines, -13 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) {
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
                             ],
@@ -870,14 +870,14 @@  discard block
 block discarded – undo
870 870
             $data = $request->getParsedBody();
871 871
 
872 872
             // Delete system fields
873
-            isset($data['slug'])                  and Arr::delete($data, 'slug');
874
-            isset($data['csrf_value'])            and Arr::delete($data, 'csrf_value');
875
-            isset($data['csrf_name'])             and Arr::delete($data, 'csrf_name');
876
-            isset($data['action'])                and Arr::delete($data, 'action');
877
-            isset($data['trumbowyg-icons-path'])  and Arr::delete($data, 'trumbowyg-icons-path');
878
-            isset($data['trumbowyg-locale'])      and Arr::delete($data, 'trumbowyg-locale');
873
+            isset($data['slug']) and Arr::delete($data, 'slug');
874
+            isset($data['csrf_value']) and Arr::delete($data, 'csrf_value');
875
+            isset($data['csrf_name']) and Arr::delete($data, 'csrf_name');
876
+            isset($data['action']) and Arr::delete($data, 'action');
877
+            isset($data['trumbowyg-icons-path']) and Arr::delete($data, 'trumbowyg-icons-path');
878
+            isset($data['trumbowyg-locale']) and Arr::delete($data, 'trumbowyg-locale');
879 879
             isset($data['flatpickr-date-format']) and Arr::delete($data, 'flatpickr-date-format');
880
-            isset($data['flatpickr-locale'])      and Arr::delete($data, 'flatpickr-locale');
880
+            isset($data['flatpickr-locale']) and Arr::delete($data, 'flatpickr-locale');
881 881
 
882 882
 
883 883
             $data['published_by'] = Session::get('uuid');
@@ -901,7 +901,7 @@  discard block
 block discarded – undo
901 901
 
902 902
             if (isset($data['routable'])) {
903 903
                 $data['routable'] = (bool) $data['routable'];
904
-            } elseif(isset($entry['routable'])) {
904
+            } elseif (isset($entry['routable'])) {
905 905
                 $data['routable'] = (bool) $entry['routable'];
906 906
             } else {
907 907
                 $data['routable'] = true;
Please login to merge, or discard this patch.
routes/web.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@
 block discarded – undo
5 5
 namespace Flextype;
6 6
 
7 7
 // UsersController
8
-$app->group('/' . $admin_route, function () use ($app) : void {
8
+$app->group('/' . $admin_route, function() use ($app) : void {
9 9
     $app->get('/installation', 'UsersController:installation')->setName('admin.users.installation');
10 10
     $app->post('/installation', 'UsersController:installationProcess')->setName('admin.users.installationProcess');
11 11
     $app->get('/login', 'UsersController:login')->setName('admin.users.login');
12 12
     $app->post('/login', 'UsersController:loginProcess')->setName('admin.users.loginProcess');
13 13
 })->add('csrf');
14 14
 
15
-$app->group('/' . $admin_route, function () use ($app) : void {
15
+$app->group('/' . $admin_route, function() use ($app) : void {
16 16
     // Dashboard
17 17
     $app->get('', 'DashboardController:index')->setName('admin.dashboard.index');
18 18
 
Please login to merge, or discard this patch.