Completed
Push — master ( 9a305e...37b087 )
by Mihail
01:56
created
src/Ffcms/Core/Traits/ClassTools.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     {
18 18
         $hash = null;
19 19
         foreach ($this as $property => $value) {
20
-            $hash = md5($hash . $property . '=' . $value);
20
+            $hash = md5($hash.$property.'='.$value);
21 21
         }
22 22
         return $hash;
23 23
     }
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/Url.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     public static function to($controller_action, $id = null, $add = null, array $params = null, $encode = true)
24 24
     {
25 25
         $pathway = self::buildPathway([$controller_action, $id, $add, $params], $encode);
26
-        return App::$Alias->baseUrl . '/' . $pathway;
26
+        return App::$Alias->baseUrl.'/'.$pathway;
27 27
     }
28 28
 
29 29
     /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                 $controller = Str::lastIn($controller, '\\', true);
61 61
             }
62 62
 
63
-            $response = $controller . '/' . $action;
63
+            $response = $controller.'/'.$action;
64 64
         }
65 65
 
66 66
         // check if controller and action is defined
@@ -70,17 +70,17 @@  discard block
 block discarded – undo
70 70
 
71 71
         // id is defined?
72 72
         if (isset($to[1]) && !Str::likeEmpty($to[1])) {
73
-            $response .= '/' . self::safeUri($to[1], $encode);
73
+            $response .= '/'.self::safeUri($to[1], $encode);
74 74
         }
75 75
 
76 76
         // add param is defined?
77 77
         if (isset($to[2]) && !Str::likeEmpty($to[2])) {
78
-            $response .= '/' . self::safeUri($to[2], $encode);
78
+            $response .= '/'.self::safeUri($to[2], $encode);
79 79
         }
80 80
 
81 81
         // try to find static alias
82
-        if (isset($routing['Alias'][env_name]) && Arr::in('/' . $response, $routing['Alias'][env_name])) {
83
-            $pathAlias = array_search('/' . $response, $routing['Alias'][env_name]);
82
+        if (isset($routing['Alias'][env_name]) && Arr::in('/'.$response, $routing['Alias'][env_name])) {
83
+            $pathAlias = array_search('/'.$response, $routing['Alias'][env_name]);
84 84
             if ($pathAlias !== false) {
85 85
                 $response = Str::lowerCase(trim($pathAlias, '/'));
86 86
             }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             }
97 97
             $queryString = http_build_query($to[3]);
98 98
             if (Str::length($queryString) > 0) {
99
-                $response .= '?' . http_build_query($to[3]);
99
+                $response .= '?'.http_build_query($to[3]);
100 100
             }
101 101
             if ($anchor !== false) {
102 102
                 $response .= $anchor;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     public static function buildPathwayFromRequest()
119 119
     {
120 120
         return self::buildPathway([
121
-            Str::lowerCase(App::$Request->getController()) . '/' . Str::lowerCase(App::$Request->getAction()),
121
+            Str::lowerCase(App::$Request->getController()).'/'.Str::lowerCase(App::$Request->getAction()),
122 122
             App::$Request->getID(),
123 123
             App::$Request->getAdd(),
124 124
             App::$Request->query->all()
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
             $to = [$to];
141 141
         }
142 142
         // call Url::to(args)
143
-        $callbackTo = call_user_func_array([__NAMESPACE__ . '\Url', 'to'], $to);
143
+        $callbackTo = call_user_func_array([__NAMESPACE__.'\Url', 'to'], $to);
144 144
 
145
-        return '<a href="' . $callbackTo . '"' . $compile_property . '>' . $name . '</a>';
145
+        return '<a href="'.$callbackTo.'"'.$compile_property.'>'.$name.'</a>';
146 146
     }
147 147
 
148 148
     /**
@@ -155,19 +155,19 @@  discard block
 block discarded – undo
155 155
     {
156 156
         /** @var array $configs */
157 157
         $configs = \App::$Properties->getAll('default');
158
-        $httpHost = $configs['baseProto'] . '://' . $configs['baseDomain'];
158
+        $httpHost = $configs['baseProto'].'://'.$configs['baseDomain'];
159 159
         if ($configs['basePath'] !== '/') {
160
-            $httpHost .= $configs['basePath'] . '/';
160
+            $httpHost .= $configs['basePath'].'/';
161 161
         }
162 162
 
163 163
         // check if is this is URI not URL
164 164
         if (!Str::startsWith($httpHost, $uri)) {
165 165
             // check if lang is defined in URI or define it
166 166
             if ($lang !== null && $configs['multiLanguage'] && !Str::startsWith($lang, $uri)) {
167
-                $uri = $lang . '/' . ltrim($uri, '/');
167
+                $uri = $lang.'/'.ltrim($uri, '/');
168 168
             }
169 169
             // add basic httpHost data
170
-            $uri = rtrim($httpHost, '/') . '/' . ltrim($uri, '/');
170
+            $uri = rtrim($httpHost, '/').'/'.ltrim($uri, '/');
171 171
         }
172 172
 
173 173
         return $uri;
Please login to merge, or discard this patch.
src/Ffcms/Core/Alias.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             $this->baseDomain = App::$Properties->get('baseDomain');
93 93
         }
94 94
         // build script url
95
-        $this->scriptUrl = App::$Request->getScheme() . '://' . $this->baseDomain;
95
+        $this->scriptUrl = App::$Request->getScheme().'://'.$this->baseDomain;
96 96
         if (App::$Properties->get('basePath') !== '/') {
97 97
             $this->scriptUrl .= rtrim(App::$Properties->get('basePath'), '/');
98 98
         }
@@ -104,27 +104,27 @@  discard block
 block discarded – undo
104 104
 
105 105
         $this->baseUrlNoLang = $this->baseUrl;
106 106
         if (App::$Request->languageInPath() && App::$Request->getLanguage() !== null) {
107
-            $this->baseUrl .= '/' . App::$Request->getLanguage();
107
+            $this->baseUrl .= '/'.App::$Request->getLanguage();
108 108
         }
109 109
 
110 110
         // add cron initiation from user if enabled
111 111
         if ((bool)App::$Properties->get('userCron') && env_name === 'Front') {
112
-            $this->addPlainCode('js', 'if(Math.random() > 0.8) { $.get("' . $this->scriptUrl . '/cron.php?rand=" + Math.random()); }');
112
+            $this->addPlainCode('js', 'if(Math.random() > 0.8) { $.get("'.$this->scriptUrl.'/cron.php?rand=" + Math.random()); }');
113 113
         }
114 114
 
115 115
         // build vendor libs alias
116
-        $this->vendorNamedLibrary['js']['jquery'] = $this->scriptUrl . '/vendor/bower/jquery/dist/jquery.min.js';
117
-        $this->vendorNamedLibrary['css']['bootstrap'] = $this->scriptUrl . '/vendor/bower/bootstrap/dist/css/bootstrap.min.css';
118
-        $this->vendorNamedLibrary['js']['bootstrap'] = $this->scriptUrl . '/vendor/bower/bootstrap/dist/js/bootstrap.min.js';
119
-        $this->vendorNamedLibrary['css']['fa'] = $this->scriptUrl . '/vendor/bower/components-font-awesome/css/font-awesome.min.css';
120
-        $this->vendorNamedLibrary['js']['jquery-ui'] = $this->scriptUrl . '/vendor/bower/jquery-ui/jquery-ui.min.js';
121
-        $this->vendorNamedLibrary['css']['jquery-ui'] = $this->scriptUrl . '/vendor/bower/jquery-ui/themes/base/jquery-ui.min.css';
116
+        $this->vendorNamedLibrary['js']['jquery'] = $this->scriptUrl.'/vendor/bower/jquery/dist/jquery.min.js';
117
+        $this->vendorNamedLibrary['css']['bootstrap'] = $this->scriptUrl.'/vendor/bower/bootstrap/dist/css/bootstrap.min.css';
118
+        $this->vendorNamedLibrary['js']['bootstrap'] = $this->scriptUrl.'/vendor/bower/bootstrap/dist/js/bootstrap.min.js';
119
+        $this->vendorNamedLibrary['css']['fa'] = $this->scriptUrl.'/vendor/bower/components-font-awesome/css/font-awesome.min.css';
120
+        $this->vendorNamedLibrary['js']['jquery-ui'] = $this->scriptUrl.'/vendor/bower/jquery-ui/jquery-ui.min.js';
121
+        $this->vendorNamedLibrary['css']['jquery-ui'] = $this->scriptUrl.'/vendor/bower/jquery-ui/themes/base/jquery-ui.min.css';
122 122
 
123 123
         $themeAll = App::$Properties->get('theme');
124 124
         if (!isset($themeAll[env_name]) || Str::length($themeAll[env_name]) < 1) {
125 125
             $themeAll[env_name] = 'default';
126 126
         }
127
-        $this->currentViewUrl = $this->scriptUrl . '/Apps/View/' . env_name . '/' . $themeAll[env_name];
127
+        $this->currentViewUrl = $this->scriptUrl.'/Apps/View/'.env_name.'/'.$themeAll[env_name];
128 128
     }
129 129
 
130 130
     /**
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/Security.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * String html tags and escape quotes
51 51
      * @param string|array $html
52 52
      * @param boolean $escapeQuotes
53
-     * @return string|array|null
53
+     * @return string|null
54 54
      */
55 55
     public function strip_tags($html, $escapeQuotes = true)
56 56
     {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      * @deprecated
91 91
      * @param $var
92 92
      * @param null $indent
93
-     * @return mixed|string
93
+     * @return string|null
94 94
      */
95 95
     public function var_export54($var, $indent = null, $guessTypes = false) {
96 96
         return Arr::exportVar($var, $indent, $guessTypes);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     public function __construct()
23 23
     {
24 24
         $config = \HTMLPurifier_Config::createDefault();
25
-        $config->set('Cache.SerializerPath', root . '/Private/Cache/HTMLPurifier/');
25
+        $config->set('Cache.SerializerPath', root.'/Private/Cache/HTMLPurifier/');
26 26
         $config->set('HTML.Allowed', 'p,b,strong,em,a[href],i,span,ul,ol,li,blockquote,h2,h3,pre,code,img[src|alt|width|height]');
27 27
         //$config->set('URI.Base', 'http://www.example.com');
28 28
         //$config->set('URI.MakeAbsolute', true);
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Form/MultiCheckboxField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         // check if options is defined
45 45
         $options = $this->properties['options'];
46 46
         if (!Obj::isIterable($options)) {
47
-            throw new SyntaxException('Options for field ' . self::nohtml($this->name) . ' is not iterable');
47
+            throw new SyntaxException('Options for field '.self::nohtml($this->name).' is not iterable');
48 48
         }
49 49
         unset($this->properties['options']);
50 50
         
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             $this->properties['value'] = $opt;
66 66
             // apply structured checkboxes style for each item
67 67
             $build .= App::$View->render('native/form/multi_checkboxes_list', [
68
-                'item' => self::buildSingleTag('input', $this->properties) . self::nohtml($opt)
68
+                'item' => self::buildSingleTag('input', $this->properties).self::nohtml($opt)
69 69
             ]);
70 70
         }
71 71
         
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Form/RadioField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         // get options from properties
42 42
         $options = $this->properties['options'];
43 43
         if (!Obj::isIterable($options)) {
44
-            throw new SyntaxException('Radio field ' . self::nohtml($this->name) . ' have no iterable options');
44
+            throw new SyntaxException('Radio field '.self::nohtml($this->name).' have no iterable options');
45 45
         }
46 46
         unset($this->properties['options'], $this->properties['value']);
47 47
 
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Form/MultiSelectField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         $options = $this->properties['options'];
37 37
         $optionsKey = (bool)$this->properties['optionsKey'];
38 38
         if (!Obj::isIterable($options)) {
39
-            throw new SyntaxException('Options for field ' . self::nohtml($this->name) . ' is not iterable');
39
+            throw new SyntaxException('Options for field '.self::nohtml($this->name).' is not iterable');
40 40
         }
41 41
         unset($this->properties['options']);
42 42
         
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Form/SelectField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $options = $this->properties['options'];
36 36
         unset($this->properties['options']);
37 37
         if (!Obj::isIterable($options)) {
38
-            throw new SyntaxException('Select field ' . self::nohtml($this->name) . ' have no iterable options');
38
+            throw new SyntaxException('Select field '.self::nohtml($this->name).' have no iterable options');
39 39
         }
40 40
         // value is not used there
41 41
         unset($this->properties['value']);
Please login to merge, or discard this patch.
src/Ffcms/Core/Arch/Widget.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
         // check if class exist
27 27
         if (!class_exists(self::$class)) {
28
-            return 'Error: Widget is not founded: ' . self::$class;
28
+            return 'Error: Widget is not founded: '.self::$class;
29 29
         }
30 30
 
31 31
         // init class and pass properties
Please login to merge, or discard this patch.