Passed
Push — master ( 2c7b25...f52af3 )
by Mihail
05:14
created
Apps/Model/Admin/Content/FormSettings.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
     }
29 29
 
30 30
     /**
31
-    * Set model properties based on defaults config values
32
-    */
31
+     * Set model properties based on defaults config values
32
+     */
33 33
     public function before()
34 34
     {
35 35
         foreach ($this->_configs as $property => $value) {
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
     }
41 41
 
42 42
     /**
43
-    * Form labels
44
-    */
43
+     * Form labels
44
+     */
45 45
     public function labels()
46 46
     {
47 47
         return [
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
     }
58 58
 
59 59
     /**
60
-    * Validation rules
61
-    */
60
+     * Validation rules
61
+     */
62 62
     public function rules()
63 63
     {
64 64
         return [
Please login to merge, or discard this patch.
Apps/Model/Admin/Profile/FormFieldUpdate.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
     }
24 24
 
25 25
     /**
26
-    * Set defaults values
27
-    */
26
+     * Set defaults values
27
+     */
28 28
     public function before()
29 29
     {
30 30
         foreach ($this->_record->toArray() as $property => $value) {
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
     }
40 40
 
41 41
     /**
42
-    * Labels
43
-    */
42
+     * Labels
43
+     */
44 44
     public function labels()
45 45
     {
46 46
         return [
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     }
53 53
 
54 54
     /**
55
-    * Validation rules
56
-    */
55
+     * Validation rules
56
+     */
57 57
     public function rules()
58 58
     {
59 59
         $rules = [
@@ -87,6 +87,6 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function delete()
89 89
     {
90
-       $this->_record->delete();
90
+        $this->_record->delete();
91 91
     }
92 92
 }
93 93
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@
 block discarded – undo
62 62
         ];
63 63
 
64 64
         foreach (App::$Properties->get('languages') as $lang) {
65
-            $rules[] = ['name.' . $lang, 'required'];
66
-            $rules[] = ['name.' . $lang, 'length_max', 50];
65
+            $rules[] = ['name.'.$lang, 'required'];
66
+            $rules[] = ['name.'.$lang, 'length_max', 50];
67 67
         }
68 68
 
69 69
         return $rules;
Please login to merge, or discard this patch.
Apps/Model/Admin/User/FormUserDelete.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
     }
22 22
 
23 23
     /**
24
-    * Set user data to model property
25
-    */
24
+     * Set user data to model property
25
+     */
26 26
     public function before()
27 27
     {
28 28
         $this->email = $this->_user->getParam('email');
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,10 +68,10 @@
 block discarded – undo
68 68
                 ->orWhere('sender_id', '=', $uid)
69 69
                 ->delete();
70 70
             // delete avatars
71
-            File::remove('/upload/user/avatar/big/' . $uid . '.jpg');
72
-            File::remove('/upload/user/avatar/medium/' . $uid . '.jpg');
73
-            File::remove('/upload/user/avatar/small/' . $uid . '.jpg');
74
-            File::remove('/upload/user/avatar/original/' . $uid . '.jpg');
71
+            File::remove('/upload/user/avatar/big/'.$uid.'.jpg');
72
+            File::remove('/upload/user/avatar/medium/'.$uid.'.jpg');
73
+            File::remove('/upload/user/avatar/small/'.$uid.'.jpg');
74
+            File::remove('/upload/user/avatar/original/'.$uid.'.jpg');
75 75
             // delete user profile and auth data
76 76
             $user->getProfile()->delete();
77 77
             $user->delete();
Please login to merge, or discard this patch.
Apps/Model/Admin/User/FormUserSettings.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
     }
20 20
 
21 21
     /**
22
-    * Load configs from app data
23
-    */
22
+     * Load configs from app data
23
+     */
24 24
     public function before()
25 25
     {
26 26
         foreach ($this->_config as $property => $value) {
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
     }
32 32
 
33 33
     /**
34
-    * Example of usage magic labels for future form helper usage
35
-    */
34
+     * Example of usage magic labels for future form helper usage
35
+     */
36 36
     public function labels()
37 37
     {
38 38
         return [
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
     }
44 44
 
45 45
     /**
46
-    * Example of usage magic rules for future usage in condition $model->validate()
47
-    */
46
+     * Example of usage magic rules for future usage in condition $model->validate()
47
+     */
48 48
     public function rules()
49 49
     {
50 50
         return [
Please login to merge, or discard this patch.
Apps/Model/Admin/User/FormUserUpdate.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
                 if ($this->newpassword !== null && Str::length($this->newpassword) >= 3) {
99 99
                     $this->_user->password = App::$Security->password_hash($this->newpassword);
100 100
                 }
101
-            } elseif($property === 'approve_token') {
101
+            } elseif ($property === 'approve_token') {
102 102
                 if ($value == "1") {
103 103
                     $this->_user->approve_token = '0';
104 104
                 } else {
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
     }
40 40
 
41 41
     /**
42
-    * Load user data on before method
43
-    */
42
+     * Load user data on before method
43
+     */
44 44
     public function before()
45 45
     {
46 46
         foreach ($this->getAllProperties() as $property => $old_data) {
Please login to merge, or discard this patch.
Apps/Model/Front/Content/EntityContentRead.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     /**
58 58
      * Prepare model attributes from passed objects
59 59
      * @throws ForbiddenException
60
-    */
60
+     */
61 61
     public function before()
62 62
     {
63 63
         $this->title = Serialize::getDecodeLocale($this->_content->title);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         }
96 96
 
97 97
         $this->source = $this->_content->source;
98
-        $this->views = $this->_content->views+1;
98
+        $this->views = $this->_content->views + 1;
99 99
         // check for dependence, add '' for general cat, ex: general/depend1/depend2/.../depend-n
100 100
         $catNestingArray = Arr::merge([0 => ''], explode('/', $this->catPath));
101 101
         if ($catNestingArray > 1) {
@@ -127,15 +127,15 @@  discard block
 block discarded – undo
127 127
         ];
128 128
 
129 129
         // get gallery images and poster data
130
-        $galleryPath = '/upload/gallery/' . $this->_content->id;
130
+        $galleryPath = '/upload/gallery/'.$this->_content->id;
131 131
         // check if gallery folder is exist
132 132
         if (Directory::exist($galleryPath)) {
133
-            $originImages = File::listFiles($galleryPath . '/orig/', ['.jpg', '.png', '.gif', '.jpeg', '.bmp', '.webp'], true);
133
+            $originImages = File::listFiles($galleryPath.'/orig/', ['.jpg', '.png', '.gif', '.jpeg', '.bmp', '.webp'], true);
134 134
             // generate poster data
135 135
             if (Arr::in($this->_content->poster, $originImages)) {
136 136
                 // original poster
137 137
                 $posterName = $this->_content->poster;
138
-                $this->posterFull = $galleryPath . '/orig/' . $posterName;
138
+                $this->posterFull = $galleryPath.'/orig/'.$posterName;
139 139
                 if (!File::exist($this->posterFull)) {
140 140
                     $this->posterFull = null;
141 141
                 }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 $posterSplit = explode('.', $posterName);
144 144
                 array_pop($posterSplit);
145 145
                 $posterCleanName = implode('.', $posterSplit);
146
-                $this->posterThumb = $galleryPath . '/thumb/' . $posterCleanName . '.jpg';
146
+                $this->posterThumb = $galleryPath.'/thumb/'.$posterCleanName.'.jpg';
147 147
                 if (!File::exist($this->posterThumb)) {
148 148
                     $this->posterThumb = null;
149 149
                 }
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
                 if (Str::startsWith($imageClearName, $this->_content->poster)) {
159 159
                     continue;
160 160
                 }
161
-                $thumbPath = $galleryPath . '/thumb/' . $imageClearName . '.jpg';
161
+                $thumbPath = $galleryPath.'/thumb/'.$imageClearName.'.jpg';
162 162
                 if (File::exist($thumbPath)) {
163
-                    $this->galleryItems[$thumbPath] = $galleryPath . '/orig/' . $image;
163
+                    $this->galleryItems[$thumbPath] = $galleryPath.'/orig/'.$image;
164 164
                 }
165 165
             }
166 166
         }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $this->rating = $this->_content->rating;
170 170
         $ignoredRate = App::$Session->get('content.rate.ignore');
171 171
         $this->canRate = true;
172
-        if (Obj::isArray($ignoredRate) && Arr::in((string)$this->id, $ignoredRate)) {
172
+        if (Obj::isArray($ignoredRate) && Arr::in((string) $this->id, $ignoredRate)) {
173 173
             $this->canRate = false;
174 174
         }
175 175
         if (!App::$User->isAuth()) {
Please login to merge, or discard this patch.
Apps/Model/Front/Profile/FormIgnoreAdd.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
     }
34 34
 
35 35
     /**
36
-    * Validation rules
37
-    */
36
+     * Validation rules
37
+     */
38 38
     public function rules()
39 39
     {
40 40
         return [
Please login to merge, or discard this 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/Model/Front/Profile/FormWallPostDelete.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 
21 21
 
22 22
     /**
23
-    * Set post id based on post active record
24
-    */
23
+     * Set post id based on post active record
24
+     */
25 25
     public function before()
26 26
     {
27 27
         $this->id = $this->_post->id;
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
 
30 30
 
31 31
     /**
32
-    * Pseudo-rules, here is not required
33
-    */
32
+     * Pseudo-rules, here is not required
33
+     */
34 34
     public function rules()
35 35
     {
36 36
         return [];
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.