Passed
Push — master ( 4d3a01...b26c9e )
by Mihail
12:24
created
Apps/Model/Admin/Application/FormAppTurn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     {
13 13
         $status = $object->disabled;
14 14
 
15
-        $object->disabled = (int)!$status; // magic inside: bool to int and reverse - 0 => 1, 1 => 0
15
+        $object->disabled = (int) !$status; // magic inside: bool to int and reverse - 0 => 1, 1 => 0
16 16
         $object->save();
17 17
     }
18 18
 }
19 19
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormCategoryDelete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
         $response = [];
111 111
         foreach ($data as $key=>$val) {
112 112
             if ($this->_record->id !== $key) {
113
-                $response[] = (string)$key;
113
+                $response[] = (string) $key;
114 114
             }
115 115
         }
116 116
         return $response;
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormCategoryUpdate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
         ];
103 103
 
104 104
         // general category
105
-        if ($this->_new === false && (int)$this->_record->id === 1) {
105
+        if ($this->_new === false && (int) $this->_record->id === 1) {
106 106
             $rules[] = ['path', 'used'];
107 107
         } else {
108 108
             $rules[] = ['path', 'required'];
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormContentUpdate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function rules()
83 83
     {
84
-        $res =  [
84
+        $res = [
85 85
             ['title.' . App::$Request->getLanguage(), 'required'],
86 86
             ['text.' . App::$Request->getLanguage(), 'required', null, true, true],
87 87
             ['text', 'used', null, true, true],
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
         $this->_content->meta_description = Serialize::encode(App::$Security->strip_tags($this->metaDescription));
143 143
         $this->_content->source = App::$Security->strip_tags($this->source);
144 144
         // check if rating is changed
145
-        if ((int)$this->addRating !== 0) {
146
-            $this->_content->rating += (int)$this->addRating;
145
+        if ((int) $this->addRating !== 0) {
146
+            $this->_content->rating += (int) $this->addRating;
147 147
         }
148 148
         // check if special comment hash is exist
149 149
         if ($this->_new || Str::length($this->_content->comment_hash) < 32) {
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         $data = ContentCategory::getSortedCategories();
182 182
         $response = [];
183 183
         foreach ($data as $key=>$val) {
184
-            $response[] = (string)$key;
184
+            $response[] = (string) $key;
185 185
         }
186 186
         return $response;
187 187
     }
Please login to merge, or discard this patch.
Apps/Model/Admin/User/FormUserUpdate.php 1 patch
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.
Apps/Model/Basic/Antivirus.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
         $this->scanFiles = json_decode(File::read('/Private/Antivirus/ScanFiles.json'));
48 48
         if (File::exist('/Private/Antivirus/Infected.json')) {
49
-            $this->infected = (array)json_decode(File::read('/Private/Antivirus/Infected.json'));
49
+            $this->infected = (array) json_decode(File::read('/Private/Antivirus/Infected.json'));
50 50
         }
51 51
     }
52 52
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                         $detected = true;
115 115
                         $pos = $found[0][1];
116 116
                         $this->infected[$path][] = [
117
-                            'pos' => (int)$pos,
117
+                            'pos' => (int) $pos,
118 118
                             'sigId' => $attrId,
119 119
                             'sigRule' => $sigContent,
120 120
                             'sever' => $attrSever,
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
                         (($pos = strpos($normalized, $sigContent)) !== false)
129 129
                     ) {
130 130
                         $this->infected[$path][] = [
131
-                            'pos' => (int)$pos,
131
+                            'pos' => (int) $pos,
132 132
                             'sigId' => $attrId,
133 133
                             'sigRule' => $sigContent,
134 134
                             'sever' => $attrSever,
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     private function prepareScanlist()
150 150
     {
151
-        $files = (object)File::listFiles(root, $this->affectedExt);
151
+        $files = (object) File::listFiles(root, $this->affectedExt);
152 152
         File::write('/Private/Antivirus/ScanFiles.json', json_encode($files));
153 153
     }
154 154
 
Please login to merge, or discard this patch.
Apps/Model/Front/Content/EntityCategoryRead.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         ];
57 57
 
58 58
         // check if this category is hidden
59
-        if ((int)$this->categoryData['configs']['showCategory'] !== 1) {
59
+        if ((int) $this->categoryData['configs']['showCategory'] !== 1) {
60 60
             throw new ForbiddenException();
61 61
         }
62 62
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                 // find first paragraph ending
82 82
                 $breakPosition = mb_strpos($text, '</p>', null, 'UTF-8');
83 83
                 // cut text from position caret before </p> (+4 symbols to save item as valid)
84
-                $text = Str::substr($text, 0, $breakPosition+4);
84
+                $text = Str::substr($text, 0, $breakPosition + 4);
85 85
             }
86 86
 
87 87
             $itemPath = $this->_allCategories[$row->category_id]['path'];
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
                 'author' => App::$User->identity($row->author_id),
129 129
                 'poster' => $poster,
130 130
                 'thumb' => $thumb,
131
-                'views' => (int)$row->views,
132
-                'rating' => (int)$row->rating,
131
+                'views' => (int) $row->views,
132
+                'rating' => (int) $row->rating,
133 133
                 'category' => $this->_allCategories[$row->category_id],
134 134
                 'uri' => '/content/read/' . $itemPath,
135 135
                 'tags' => $tags
Please login to merge, or discard this patch.
Apps/Model/Front/Content/EntityContentRead.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
             $this->authorName = Str::likeEmpty($profile->nick) ? __('No name') : $profile->nick;
87 87
         }
88 88
         $this->source = $this->_content->source;
89
-        $this->views = $this->_content->views+1;
89
+        $this->views = $this->_content->views + 1;
90 90
         // check for dependence, add '' for general cat, ex: general/depend1/depend2/.../depend-n
91 91
         $catNestingArray = Arr::merge([0 => ''], explode('/', $this->catPath));
92 92
         if ($catNestingArray > 1) {
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.