Passed
Push — master ( cc7747...d2190f )
by Mihail
10:36
created
Apps/Model/Admin/Content/FormContentUpdate.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 use Ffcms\Core\Helper\Date;
10 10
 use Ffcms\Core\Helper\FileSystem\Directory;
11 11
 use Ffcms\Core\Helper\FileSystem\File;
12
-use Ffcms\Core\Helper\Type\Integer;
13 12
 use Ffcms\Core\Helper\Type\Obj;
14 13
 use Ffcms\Core\Helper\Serialize;
15 14
 use Ffcms\Core\Helper\Type\Str;
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         if ($this->_content->id === null) {
60 60
             $this->_new = true;
61 61
             if (null === $this->galleryFreeId) {
62
-                $this->galleryFreeId = '_tmp_' . Str::randomLatin(mt_rand(16, 32));
62
+                $this->galleryFreeId = '_tmp_'.Str::randomLatin(mt_rand(16, 32));
63 63
             }
64 64
             if (null === $this->authorId) {
65 65
                 $this->authorId = App::$User->identity()->getId();
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
     public function rules()
92 92
     {
93 93
         $res = [
94
-            ['title.' . App::$Request->getLanguage(), 'required'],
95
-            ['text.' . App::$Request->getLanguage(), 'required'],
94
+            ['title.'.App::$Request->getLanguage(), 'required'],
95
+            ['text.'.App::$Request->getLanguage(), 'required'],
96 96
             ['text', 'used'],
97 97
             ['path', 'reverse_match', '/[\/\'~`\!@#\$%\^&\*\(\)+=\{\}\[\]\|;:"\<\>,\?\\\]/'],
98 98
             [['path', 'categoryId', 'authorId', 'display', 'galleryFreeId', 'title'], 'required'],
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
         ];
106 106
 
107 107
         foreach (App::$Properties->get('languages') as $lang) {
108
-            $res[] = ['title.' . $lang, 'length_max', 120, null, true, true];
109
-            $res[] = ['keywords.' . $lang, 'length_max', 150];
110
-            $res[] = ['description.' . $lang, 'length_max', 250];
108
+            $res[] = ['title.'.$lang, 'length_max', 120, null, true, true];
109
+            $res[] = ['keywords.'.$lang, 'length_max', 150];
110
+            $res[] = ['description.'.$lang, 'length_max', 250];
111 111
         }
112 112
 
113 113
         return $res;
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
         $this->_content->meta_description = Serialize::encode($this->metaDescription);
164 164
         $this->_content->source = $this->source;
165 165
         // check if rating is changed
166
-        if ((int)$this->addRating !== 0) {
167
-            $this->_content->rating += (int)$this->addRating;
166
+        if ((int) $this->addRating !== 0) {
167
+            $this->_content->rating += (int) $this->addRating;
168 168
         }
169 169
         // check if special comment hash is exist
170 170
         if ($this->_new || Str::length($this->_content->comment_hash) < 32) {
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         }
177 177
 
178 178
         // save poster data
179
-        $posterPath = '/upload/gallery/' . $this->galleryFreeId . '/orig/' . $this->poster;
179
+        $posterPath = '/upload/gallery/'.$this->galleryFreeId.'/orig/'.$this->poster;
180 180
         if (File::exist($posterPath)) {
181 181
             $this->_content->poster = $this->poster;
182 182
         }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
         // move files
213 213
         if ($tmpGalleryId !== $this->_content->id) {
214
-            Directory::rename('/upload/gallery/' . $tmpGalleryId, $this->_content->id);
214
+            Directory::rename('/upload/gallery/'.$tmpGalleryId, $this->_content->id);
215 215
         }
216 216
     }
217 217
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         $data = ContentCategory::getSortedCategories();
225 225
         $response = [];
226 226
         foreach ($data as $key=>$val) {
227
-            $response[] = (string)$key;
227
+            $response[] = (string) $key;
228 228
         }
229 229
         return $response;
230 230
     }
Please login to merge, or discard this patch.
Apps/Model/Front/Profile/FormIgnoreAdd.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     public function save()
53 53
     {
54 54
         // check if target is myself or always exist in block list
55
-        if ($this->_user->getId() === (int)$this->id || Blacklist::have($this->_user->getId(), $this->id)) {
55
+        if ($this->_user->getId() === (int) $this->id || Blacklist::have($this->_user->getId(), $this->id)) {
56 56
             return false;
57 57
         }
58 58
 
Please login to merge, or discard this patch.
Apps/View/Admin/default/application/turn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             [['text' => __('Name')], ['text' => $app->getLocaleName()]],
32 32
             [['text' => __('System name')], ['text' => $app->sys_name]],
33 33
             [['text' => __('Last update')], ['text' => Date::convertToDatetime($app->updated_at, DATE::FORMAT_TO_SECONDS)]],
34
-            [['text' => __('Status')], ['text' => ((int)$app->disabled === 0) ? 'On' : 'Off'], 'property' => ['class' =>  ((int)$app->disabled === 0) ? 'alert-success' : 'alert-danger']]
34
+            [['text' => __('Status')], ['text' => ((int) $app->disabled === 0) ? 'On' : 'Off'], 'property' => ['class' =>  ((int) $app->disabled === 0) ? 'alert-success' : 'alert-danger']]
35 35
         ]
36 36
     ]
37 37
 ]); ?>
Please login to merge, or discard this patch.
Apps/View/Admin/default/user/_tabs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
         ['type' => 'link', 'text' => __('Group management'), 'link' => ['user/grouplist']],
10 10
         ['type' => 'link', 'text' => __('Settings'), 'link' => ['user/settings']]
11 11
     ]
12
-]);?>
13 12
\ No newline at end of file
13
+]); ?>
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Private/Config/Permissions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3
-return array (
3
+return array(
4 4
   0 => 'global/write',
5 5
   1 => 'global/modify',
6 6
   2 => 'global/file',
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormCategoryUpdate.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Ffcms\Core\App;
6 6
 use Ffcms\Core\Arch\Model;
7
-use Ffcms\Core\Helper\Type\Obj;
8 7
 use Ffcms\Core\Helper\Type\Str;
9 8
 use Ffcms\Core\Interfaces\iUser;
10 9
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         ];
108 108
 
109 109
         // general category
110
-        if ($this->_new === false && (int)$this->_record->id === 1) {
110
+        if ($this->_new === false && (int) $this->_record->id === 1) {
111 111
             $rules[] = ['path', 'used'];
112 112
         } else {
113 113
             $rules[] = ['path', 'required'];
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             $rules[] = ['path', 'reverse_match', '/[\/\'~`\!@#\$%\^&\*\(\)+=\{\}\[\]\|;:"\<\>,\?\\\]/'];
117 117
         }
118 118
 
119
-        $rules[] = ['title.' . App::$Request->getLanguage(), 'required'];
119
+        $rules[] = ['title.'.App::$Request->getLanguage(), 'required'];
120 120
 
121 121
 
122 122
         return $rules;
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     {
130 130
         $this->_record->title = Serialize::encode(App::$Security->strip_tags($this->title));
131 131
         $this->_record->description = Serialize::encode(App::$Security->strip_tags($this->description));
132
-        $savePath = trim($this->_pathNested . '/' . $this->path, '/');
132
+        $savePath = trim($this->_pathNested.'/'.$this->path, '/');
133 133
         $this->_record->path = $savePath;
134 134
         $this->_record->configs = Serialize::encode($this->configs);
135 135
         $this->_record->save();
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         // build path with owner category
165 165
         $this->_pathNested = $owner->path;
166 166
         if (Str::length($this->_pathNested) > 0) {
167
-            $path = $this->_pathNested . '/' . $path;
167
+            $path = $this->_pathNested.'/'.$path;
168 168
         }
169 169
 
170 170
         // make select for check
Please login to merge, or discard this patch.
Apps/View/Admin/default/content/_tabs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
         ['type' => 'link', 'text' => __('Group management'), 'link' => ['user/grouplist']],
10 10
         ['type' => 'link', 'text' => __('Settings'), 'link' => ['user/settings']]
11 11
     ]
12
-]);?>
13 12
\ No newline at end of file
13
+]); ?>
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/View/Admin/default/profile/_tabs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
         ['type' => 'link', 'text' => __('Group management'), 'link' => ['user/grouplist']],
10 10
         ['type' => 'link', 'text' => __('Settings'), 'link' => ['user/settings']]
11 11
     ]
12
-]);?>
13 12
\ No newline at end of file
13
+]); ?>
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/Model/Install/Main/FormInstall.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Apps\ActiveRecord\Profile;
6 6
 use Apps\ActiveRecord\User;
7
-use Apps\Controller\Console\Db;
8 7
 use Ffcms\Core\App;
9 8
 use Ffcms\Core\Arch\Model;
10 9
 use Ffcms\Core\Helper\FileSystem\File;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,14 +71,14 @@
 block discarded – undo
71 71
         $cfg['database'] = $this->db;
72 72
         $cfg['adminEmail'] = $this->email;
73 73
         $cfg['singleLanguage'] = $this->singleLanguage;
74
-        $cfg['multiLanguage'] = (bool)$this->multiLanguage;
75
-        $cfg['passwordSalt'] = '$2a$07$' . Str::randomLatinNumeric(mt_rand(21, 30)) . '$';
76
-        $cfg['debug']['cookie']['key'] = 'fdebug_' . Str::randomLatinNumeric(mt_rand(4, 16));
74
+        $cfg['multiLanguage'] = (bool) $this->multiLanguage;
75
+        $cfg['passwordSalt'] = '$2a$07$'.Str::randomLatinNumeric(mt_rand(21, 30)).'$';
76
+        $cfg['debug']['cookie']['key'] = 'fdebug_'.Str::randomLatinNumeric(mt_rand(4, 16));
77 77
         $cfg['debug']['cookie']['value'] = Str::randomLatinNumeric(mt_rand(32, 128));
78 78
 
79 79
         // import database tables
80 80
         $connectName = 'install';
81
-        include(root . '/Private/Database/install.php');
81
+        include(root.'/Private/Database/install.php');
82 82
 
83 83
         // insert admin user
84 84
         $user = new User();
Please login to merge, or discard this patch.