Passed
Push — dev ( cc4fcc...567ad4 )
by Sergey
05:14
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
                 // Predefine data values based on fieldset default values
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 
285 285
                 if ($this->entries->create($id, $data_result)) {
286 286
 
287
-                    if (! Filesystem::has(PATH['project'] . '/uploads' . '/entries/' . $id)) {
287
+                    if (!Filesystem::has(PATH['project'] . '/uploads' . '/entries/' . $id)) {
288 288
                         Filesystem::createDir(PATH['project'] . '/uploads' . '/entries/' . $id);
289 289
                     }
290 290
 
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
 
719 719
                             ],
720 720
                             'edit_entry' => [
721
-                                'link' => $this->router->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query). '&type=editor',
721
+                                'link' => $this->router->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query) . '&type=editor',
722 722
                                 'title' => __('admin_editor'),
723 723
 
724 724
                             ],
@@ -867,14 +867,14 @@  discard block
 block discarded – undo
867 867
             $data = $request->getParsedBody();
868 868
 
869 869
             // Delete system fields
870
-            isset($data['slug'])                  and Arr::delete($data, 'slug');
871
-            isset($data['csrf_value'])            and Arr::delete($data, 'csrf_value');
872
-            isset($data['csrf_name'])             and Arr::delete($data, 'csrf_name');
873
-            isset($data['action'])                and Arr::delete($data, 'action');
874
-            isset($data['trumbowyg-icons-path'])  and Arr::delete($data, 'trumbowyg-icons-path');
875
-            isset($data['trumbowyg-locale'])      and Arr::delete($data, 'trumbowyg-locale');
870
+            isset($data['slug']) and Arr::delete($data, 'slug');
871
+            isset($data['csrf_value']) and Arr::delete($data, 'csrf_value');
872
+            isset($data['csrf_name']) and Arr::delete($data, 'csrf_name');
873
+            isset($data['action']) and Arr::delete($data, 'action');
874
+            isset($data['trumbowyg-icons-path']) and Arr::delete($data, 'trumbowyg-icons-path');
875
+            isset($data['trumbowyg-locale']) and Arr::delete($data, 'trumbowyg-locale');
876 876
             isset($data['flatpickr-date-format']) and Arr::delete($data, 'flatpickr-date-format');
877
-            isset($data['flatpickr-locale'])      and Arr::delete($data, 'flatpickr-locale');
877
+            isset($data['flatpickr-locale']) and Arr::delete($data, 'flatpickr-locale');
878 878
 
879 879
 
880 880
             $data['published_by'] = Session::get('uuid');
@@ -898,7 +898,7 @@  discard block
 block discarded – undo
898 898
 
899 899
             if (isset($data['routable'])) {
900 900
                 $data['routable'] = (bool) $data['routable'];
901
-            } elseif(isset($entry['routable'])) {
901
+            } elseif (isset($entry['routable'])) {
902 902
                 $data['routable'] = (bool) $entry['routable'];
903 903
             } else {
904 904
                 $data['routable'] = true;
Please login to merge, or discard this patch.