Passed
Push — master ( 02a4a5...734a7e )
by Mihail
05:36
created
Widgets/Basic/LanguageSwitcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         foreach (App::$Translate->getAvailableLangs() as $lang) {
34 34
             $items[] = [
35 35
                 'type' => 'link',
36
-                'link' => App::$Alias->baseUrlNoLang . '/' . $lang . App::$Request->getPathInfo(),
36
+                'link' => App::$Alias->baseUrlNoLang.'/'.$lang.App::$Request->getPathInfo(),
37 37
                 'text' => '<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="flag flag-'.$lang.'" />',
38 38
                 'html' => true,
39 39
                 '!secure' => true
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 $uriRequest = $_SERVER['REQUEST_URI'];
13 13
 
14 14
 // get configs to prepare posible route to switch environment
15
-$configs = require(root . '/Private/Config/Default.php');
15
+$configs = require(root.'/Private/Config/Default.php');
16 16
 // remove base path
17 17
 $uriRequest = substr($uriRequest, strlen($configs['basePath']));
18 18
 $uriArray = explode('/', $uriRequest);
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 $uriLoader = ucfirst(strtolower(str_replace('.', '', $uriLoader)));
24 24
 
25 25
 // if loader of interface is available - require it
26
-if (in_array($uriLoader, $loaderList, true) && file_exists(root . '/Loader/' . $uriLoader . '/index.php')) {
27
-    require_once (root . '/Loader/' . $uriLoader . '/index.php');
26
+if (in_array($uriLoader, $loaderList, true) && file_exists(root.'/Loader/'.$uriLoader.'/index.php')) {
27
+    require_once (root.'/Loader/'.$uriLoader.'/index.php');
28 28
 } else { // else - try to load default interface
29
-    require_once (root . '/Loader/Front/index.php');
29
+    require_once (root.'/Loader/Front/index.php');
30 30
 }
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
Loader/Api/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 // this environment is based on json response type
13 13
 define('env_type', 'json');
14 14
 
15
-require_once(root . '/Loader/Autoload.php');
15
+require_once(root.'/Loader/Autoload.php');
16 16
 
17 17
 // make fast-access alias \App::$Object
18 18
 // class_alias('Ffcms\Core\App', 'App');
Please login to merge, or discard this patch.
Loader/Autoload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@
 block discarded – undo
8 8
 }
9 9
 
10 10
 // load composer packages
11
-$loader = require root . '/vendor/autoload.php';
11
+$loader = require root.'/vendor/autoload.php';
12 12
 // enable autoload for general namespaces user apps
13 13
 $loader->add('Apps\\', root);
14
-$loader->add('Apps\\', root . '/vendor/phpffcms/demo-app-package/src'); // todo: remove me
14
+$loader->add('Apps\\', root.'/vendor/phpffcms/demo-app-package/src'); // todo: remove me
15 15
 $loader->add('Extend\\', root);
16 16
 $loader->add('Widgets\\', root);
Please login to merge, or discard this patch.
console.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,4 +3,4 @@
 block discarded – undo
3 3
 define('root', __DIR__);
4 4
 error_reporting(E_ALL ^ E_NOTICE);
5 5
 
6
-require_once(root . '/Loader/Console/index.php');
7 6
\ No newline at end of file
7
+require_once(root.'/Loader/Console/index.php');
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
Extend/Core/Arch/FrontWidget.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@
 block discarded – undo
22 22
         // widget is not founded, deny run
23 23
         if ($wData === null) {
24 24
             if (App::$Debug !== null) {
25
-                App::$Debug->addMessage('Widget with name "' . App::$Security->strip_tags(self::$name) . '"[' . self::$class . '] is not founded!', 'error');
25
+                App::$Debug->addMessage('Widget with name "'.App::$Security->strip_tags(self::$name).'"['.self::$class.'] is not founded!', 'error');
26 26
             }
27 27
             return null;
28 28
         }
29 29
 
30 30
         // if widget is disabled - lets return nothing
31
-        if ((int)$wData->disabled === 1) {
31
+        if ((int) $wData->disabled === 1) {
32 32
             return null;
33 33
         }
34 34
 
Please login to merge, or discard this patch.
Extend/Core/Arch/AdminController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,18 +86,18 @@  discard block
 block discarded – undo
86 86
         $user = App::$User->identity();
87 87
         // user is not authed ?
88 88
         if ($user === null || !App::$User->isAuth()) {
89
-            $redirectUrl = App::$Alias->scriptUrl . '/user/login';
89
+            $redirectUrl = App::$Alias->scriptUrl.'/user/login';
90 90
             App::$Response->redirect($redirectUrl, true);
91 91
             exit();
92 92
         }
93 93
 
94
-        $permission = env_name . '/' . App::$Request->getController() . '/' . App::$Request->getAction();
94
+        $permission = env_name.'/'.App::$Request->getController().'/'.App::$Request->getAction();
95 95
 
96 96
         // doesn't have permission? get the f*ck out
97 97
         if (!$user->getRole()->can($permission)) {
98 98
             App::$Session->invalidate();
99 99
 
100
-            $redirectUrl = App::$Alias->scriptUrl . '/user/login';
100
+            $redirectUrl = App::$Alias->scriptUrl.'/user/login';
101 101
             App::$Response->redirect($redirectUrl, true);
102 102
             exit();
103 103
         }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function getConfigs()
146 146
     {
147
-        return $this->type === 'widget' ? (array)Serialize::decode($this->widget->configs) : (array)Serialize::decode($this->application->configs);
147
+        return $this->type === 'widget' ? (array) Serialize::decode($this->widget->configs) : (array) Serialize::decode($this->application->configs);
148 148
     }
149 149
 
150 150
     /**
Please login to merge, or discard this patch.
Extend/Core/Arch/FrontAppController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         }
24 24
 
25 25
         // add localizations
26
-        App::$Translate->append(App::$Alias->currentViewPath . '/I18n/' . App::$Request->getLanguage() . '.php');
26
+        App::$Translate->append(App::$Alias->currentViewPath.'/I18n/'.App::$Request->getLanguage().'.php');
27 27
 
28 28
         parent::__construct();
29 29
     }
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
         // if app class extend current class we can get origin name
39 39
         $aliasName = Str::lastIn(get_class($this), '\\', true);
40 40
         // check if this controller is enabled
41
-        $this->application = MemoryObject::instance()->get('cache.apps.' . $appName . $aliasName);
41
+        $this->application = MemoryObject::instance()->get('cache.apps.'.$appName.$aliasName);
42 42
         if ($this->application === null) {
43 43
             $this->application = AppRecord::where('type', '=', 'app')
44 44
                 ->where('sys_name', '=', $appName)
45 45
                 ->orWhere('sys_name', '=', $aliasName)
46 46
                 ->first();
47 47
             if ($this->application !== null) {
48
-                MemoryObject::instance()->set('cache.apps.' . $appName . $aliasName, $this->application);
48
+                MemoryObject::instance()->set('cache.apps.'.$appName.$aliasName, $this->application);
49 49
             }
50 50
         }
51 51
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         }
56 56
 
57 57
         // check if disabled (0 = enabled, anything else = on)
58
-        return (int)$this->application->disabled === 0;
58
+        return (int) $this->application->disabled === 0;
59 59
     }
60 60
 
61 61
     /**
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
         if ($this->configs !== null) {
68 68
             return $this->configs;
69 69
         }
70
-        $configs = (array)unserialize($this->application->configs); // data always stored like a "string" objects
70
+        $configs = (array) unserialize($this->application->configs); // data always stored like a "string" objects
71 71
         foreach ($configs as $cfg => $value) {
72 72
             if (Obj::isLikeInt($value)) {
73
-                $configs[$cfg] = (int)$value; // convert string 1 "1" to int 1 1
73
+                $configs[$cfg] = (int) $value; // convert string 1 "1" to int 1 1
74 74
             }
75 75
         }
76 76
         $this->configs = $configs;
Please login to merge, or discard this patch.
Extend/Core/Captcha/Gregwar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public function get()
27 27
     {
28
-        return App::$Alias->scriptUrl . '/api/captcha/gregwar?time=' . microtime(true) . '&lang=' . App::$Request->getLanguage();
28
+        return App::$Alias->scriptUrl.'/api/captcha/gregwar?time='.microtime(true).'&lang='.App::$Request->getLanguage();
29 29
     }
30 30
 
31 31
     /**
Please login to merge, or discard this patch.