Passed
Push — master ( e6812d...2fec17 )
by Mihail
05:18
created
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/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/Profile/FormSettings.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         // labels for custom fields
79 79
         foreach (ProfileField::all() as $custom) {
80
-            $labels['custom_data.' . $custom->id] = Serialize::getDecodeLocale($custom->name);
80
+            $labels['custom_data.'.$custom->id] = Serialize::getDecodeLocale($custom->name);
81 81
         }
82 82
 
83 83
         return $labels;
@@ -103,12 +103,12 @@  discard block
 block discarded – undo
103 103
         // custom profile fields
104 104
         foreach (ProfileField::all() as $custom) {
105 105
             $rules[] = [
106
-                'custom_data.' . $custom->id,
106
+                'custom_data.'.$custom->id,
107 107
                 'used'
108 108
             ];
109 109
             $rules[] = [
110
-                'custom_data.' . $custom->id,
111
-                (int)$custom->reg_cond === 1 ? 'direct_match' : 'reverse_match',
110
+                'custom_data.'.$custom->id,
111
+                (int) $custom->reg_cond === 1 ? 'direct_match' : 'reverse_match',
112 112
                 $custom->reg_exp
113 113
             ];
114 114
         }
Please login to merge, or discard this patch.
Apps/Model/Front/Feedback/FormAnswerAdd.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function __construct($recordPost, $userId = 0)
32 32
     {
33 33
         $this->_post = $recordPost;
34
-        $this->_userId = (int)$userId;
34
+        $this->_userId = (int) $userId;
35 35
         parent::__construct();
36 36
     }
37 37
 
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
 
99 99
         // add notification msg
100 100
         $targetId = $this->_post->user_id;
101
-        if ($targetId !== null && (int)$targetId > 0 && $targetId !== $this->_userId) {
101
+        if ($targetId !== null && (int) $targetId > 0 && $targetId !== $this->_userId) {
102 102
             $notify = new EntityAddNotification($targetId);
103
-            $uri = '/feedback/read/' . $this->_post->id . '/' . $this->_post->hash . '#feedback-answer-' . $record->id;
103
+            $uri = '/feedback/read/'.$this->_post->id.'/'.$this->_post->hash.'#feedback-answer-'.$record->id;
104 104
             $notify->add($uri, EntityAddNotification::MSG_ADD_FEEDBACKANSWER, [
105 105
                 'snippet' => Text::snippet(App::$Security->strip_tags($this->message), 50),
106 106
                 'post' => Text::snippet(App::$Security->strip_tags($this->_post->message), 50)
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.