Passed
Push — master ( 1fadb0...f949a1 )
by Mihail
08:15
created
Apps/Controller/Admin/Widget.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $search = \Apps\ActiveRecord\App::getItem('widget', $controller);
88 88
 
89 89
         // check what we got
90
-        if ($search === null || (int)$search->id < 1) {
90
+        if ($search === null || (int) $search->id < 1) {
91 91
             throw new NotFoundException('Widget is not founded');
92 92
         }
93 93
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         $record = \Apps\ActiveRecord\App::where('sys_name', '=', $controllerName)->where('type', '=', 'widget')->first();
122 122
 
123 123
         // check if widget admin controller exists
124
-        if ($record === null || (int)$record->id < 1) {
124
+        if ($record === null || (int) $record->id < 1) {
125 125
             throw new ForbiddenException('Widget is not founded');
126 126
         }
127 127
 
Please login to merge, or discard this patch.
Apps/Model/Admin/Feedback/FormAnswerAdd.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@
 block discarded – undo
37 37
         $record->save();
38 38
 
39 39
         // add user notification
40
-        if ((int)$this->_post->user_id > 0 && $this->_userId !== (int)$this->_post->user_id) {
41
-            $notify = new EntityAddNotification((int)$this->_post->user_id);
42
-            $uri = '/feedback/read/' . $this->_post->id . '/' . $this->_post->hash . '#feedback-answer-' . $record->id;
40
+        if ((int) $this->_post->user_id > 0 && $this->_userId !== (int) $this->_post->user_id) {
41
+            $notify = new EntityAddNotification((int) $this->_post->user_id);
42
+            $uri = '/feedback/read/'.$this->_post->id.'/'.$this->_post->hash.'#feedback-answer-'.$record->id;
43 43
 
44 44
             $notify->add($uri, EntityAddNotification::MSG_ADD_FEEDBACKANSWER, [
45 45
                 'snippet' => Text::snippet($this->message, 50),
Please login to merge, or discard this patch.
Apps/Model/Admin/Application/FormTurn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     {
31 31
         $status = $this->_record->disabled;
32 32
 
33
-        $this->_record->disabled = (int)!$status; // magic inside: bool to int and reverse - 0 => 1, 1 => 0
33
+        $this->_record->disabled = (int) !$status; // magic inside: bool to int and reverse - 0 => 1, 1 => 0
34 34
         $this->_record->save();
35 35
     }
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/Model/Admin/User/FormUserSettings.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@
 block discarded – undo
27 27
     }
28 28
 
29 29
     /**
30
-    * Load configs from app data
31
-    */
30
+     * Load configs from app data
31
+     */
32 32
     public function before()
33 33
     {
34 34
         if ($this->_config === null) {
Please login to merge, or discard this patch.
Apps/Model/Admin/Newcontent/FormSettings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
26 26
     */
27 27
     public function before()
28 28
     {
29
-        $this->count = (int)$this->_configs['count'];
30
-        $this->cache = (int)$this->_configs['cache'];
29
+        $this->count = (int) $this->_configs['count'];
30
+        $this->cache = (int) $this->_configs['cache'];
31 31
     }
32 32
 
33 33
     /**
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormContentUpdate.php 1 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/Admin/Content/FormContentClear.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     {
44 44
         // remove gallery files if exists
45 45
         foreach ($this->_records->get() as $record) {
46
-            $galleryPath = '/upload/gallery/' . (int)$record->id;
46
+            $galleryPath = '/upload/gallery/'.(int) $record->id;
47 47
             if (Directory::exist($galleryPath)) {
48 48
                 Directory::remove($galleryPath);
49 49
             }
Please login to merge, or discard this patch.
Apps/Model/Front/User/FormLogin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
     {
71 71
         $password = App::$Security->password_hash($this->password);
72 72
 
73
-        $search = App::$User->where('password', '=', $password)->where(function ($query) {
73
+        $search = App::$User->where('password', '=', $password)->where(function($query) {
74 74
             $query->where('login', '=', $this->login)
75 75
                 ->orWhere('email', '=', $this->login);
76 76
         });
Please login to merge, or discard this patch.
Extend/Core/Arch/FrontAppController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         }
32 32
 
33 33
         // add localizations
34
-        App::$Translate->append(App::$Alias->currentViewPath . '/I18n/' . App::$Request->getLanguage() . '.php');
34
+        App::$Translate->append(App::$Alias->currentViewPath.'/I18n/'.App::$Request->getLanguage().'.php');
35 35
 
36 36
         parent::__construct();
37 37
     }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         }
55 55
 
56 56
         // check if disabled (0 = enabled, anything else = on)
57
-        return (int)$this->application->disabled === 0;
57
+        return (int) $this->application->disabled === 0;
58 58
     }
59 59
 
60 60
     /**
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
         if ($this->configs !== null) {
67 67
             return $this->configs;
68 68
         }
69
-        $configs = (array)$this->application->configs;
69
+        $configs = (array) $this->application->configs;
70 70
         foreach ($configs as $cfg => $value) {
71 71
             if (Obj::isLikeInt($value)) {
72
-                $configs[$cfg] = (int)$value; // convert string 1 "1" to int 1 1
72
+                $configs[$cfg] = (int) $value; // convert string 1 "1" to int 1 1
73 73
             }
74 74
         }
75 75
         $this->configs = $configs;
Please login to merge, or discard this patch.