Passed
Push — master ( 3d316c...cbe4a6 )
by Sergey
07:19 queued 10s
created
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($themes_admin_autoload = __DIR__ . '/vendor/autoload.php') and exit('Please run: <i>composer install</i> themes admin plugin');
26
+!is_file($themes_admin_autoload = __DIR__ . '/vendor/autoload.php') and exit('Please run: <i>composer install</i> themes admin plugin');
27 27
 
28 28
 /**
29 29
  * Register The Auto Loader
Please login to merge, or discard this patch.
routes/web.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 namespace Flextype;
6 6
 
7
-$app->group('/' . $admin_route, function () use ($app) : void {
7
+$app->group('/' . $admin_route, function() use ($app) : void {
8 8
 
9 9
     // ThemesController
10 10
     $app->get('/themes', 'ThemesController:index')->setName('admin.themes.index');
Please login to merge, or discard this patch.
dependencies.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
 use function Flextype\Component\I18n\__;
17 17
 
18 18
 // Add Admin Navigation
19
-$flextype->registry->set('plugins.admin.settings.navigation.extends.themes', ['title' => __('themes_admin_themes'),'icon' => 'fas fa-palette', 'link' => $flextype->router->pathFor('admin.themes.index')]);
19
+$flextype->registry->set('plugins.admin.settings.navigation.extends.themes', ['title' => __('themes_admin_themes'), 'icon' => 'fas fa-palette', 'link' => $flextype->router->pathFor('admin.themes.index')]);
20 20
 
21 21
 /**
22 22
  * Add themes service to Flextype container
23 23
  */
24
-$flextype['themes'] = static function ($container) use ($flextype, $app) {
24
+$flextype['themes'] = static function($container) use ($flextype, $app) {
25 25
     return new Themes($flextype, $app);
26 26
 };
27 27
 
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
 $flextype['themes']->init($flextype, $app);
32 32
 
33 33
 // Add ThemesController
34
-$flextype['ThemesController'] = static function ($container) {
34
+$flextype['ThemesController'] = static function($container) {
35 35
     return new ThemesController($container);
36 36
 };
37 37
 
38 38
 // Add TemplatesController
39
-$flextype['TemplatesController'] = static function ($container) {
39
+$flextype['TemplatesController'] = static function($container) {
40 40
     return new TemplatesController($container);
41 41
 };
42 42
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,5 +51,5 @@
 block discarded – undo
51 51
 }
52 52
 
53 53
 $flextype['registry']->set('plugins.admin.settings.flextype_menu',
54
-                       array_merge($_flextype_menu,
54
+                        array_merge($_flextype_menu,
55 55
                         [0 => ['link' => ['url' => $site_url, 'title' => __('themes_admin_view_site'), 'is_external' => true, 'icon' => 'fas fa-globe']]]));
Please login to merge, or discard this patch.
app/Models/Themes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $themes_list = $this->getThemes();
48 48
 
49 49
         // If Themes List isnt empty then continue
50
-        if (! is_array($themes_list) || count($themes_list) <= 0) {
50
+        if (!is_array($themes_list) || count($themes_list) <= 0) {
51 51
             return;
52 52
         }
53 53
 
@@ -79,10 +79,10 @@  discard block
 block discarded – undo
79 79
                 $custom_theme_settings_file = PATH['project'] . '/config/themes/' . $theme['dirname'] . '/settings.yaml';
80 80
 
81 81
                 // Create custom theme settings directory
82
-                ! Filesystem::has($custom_theme_settings_dir)  and Filesystem::createDir($custom_theme_settings_dir);
82
+                !Filesystem::has($custom_theme_settings_dir) and Filesystem::createDir($custom_theme_settings_dir);
83 83
 
84 84
                 // Check if default theme settings file exists
85
-                if (! Filesystem::has($default_theme_settings_file)) {
85
+                if (!Filesystem::has($default_theme_settings_file)) {
86 86
                     throw new RuntimeException('Load ' . $theme['dirname'] . ' theme settings - failed!');
87 87
                 }
88 88
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 }
96 96
 
97 97
                 // Create custom theme settings file
98
-                ! Filesystem::has($custom_theme_settings_file) and Filesystem::write($custom_theme_settings_file, $default_theme_settings_file_content);
98
+                !Filesystem::has($custom_theme_settings_file) and Filesystem::write($custom_theme_settings_file, $default_theme_settings_file_content);
99 99
 
100 100
                 // Get custom theme settings content
101 101
                 $custom_theme_settings_file_content = Filesystem::read($custom_theme_settings_file);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                 }
107 107
 
108 108
                 // Check if default theme manifest file exists
109
-                if (! Filesystem::has($default_theme_manifest_file)) {
109
+                if (!Filesystem::has($default_theme_manifest_file)) {
110 110
                     RuntimeException('Load ' . $theme['dirname'] . ' theme manifest - failed!');
111 111
                 }
112 112
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
         // Go through founded themes
184 184
         foreach ($_themes_list as $theme) {
185
-            if ($theme['type'] !== 'dir' || ! Filesystem::has($theme['path'] . '/' . 'theme.yaml')) {
185
+            if ($theme['type'] !== 'dir' || !Filesystem::has($theme['path'] . '/' . 'theme.yaml')) {
186 186
                 continue;
187 187
             }
188 188
 
Please login to merge, or discard this patch.
app/Controllers/TemplatesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
         $file = PATH['project'] . '/themes/' . $theme . '/' . $this->_type_location($type) . $this->slugify->slugify($id) . '.html';
119 119
 
120
-        if (! Filesystem::has($file)) {
120
+        if (!Filesystem::has($file)) {
121 121
             if (Filesystem::write(
122 122
                 $file,
123 123
                 ''
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         $theme = $request->getParsedBody()['theme'];
262 262
         $type  = $request->getParsedBody()['type_current'];
263 263
 
264
-        if (! Filesystem::has(PATH['project'] . '/themes/' . $this->registry->get('plugins.site.settings.theme') . '/' . $this->_type_location($type) . $request->getParsedBody()['id'] . '.html')) {
264
+        if (!Filesystem::has(PATH['project'] . '/themes/' . $this->registry->get('plugins.site.settings.theme') . '/' . $this->_type_location($type) . $request->getParsedBody()['id'] . '.html')) {
265 265
             if (Filesystem::rename(
266 266
                 PATH['project'] . '/themes/' . $theme . '/' . $this->_type_location($type) . $request->getParsedBody()['id_current'] . '.html',
267 267
                 PATH['project'] . '/themes/' . $theme . '/' . $this->_type_location($type) . $request->getParsedBody()['id'] . '.html'
Please login to merge, or discard this patch.