Passed
Push — master ( 3db37c...11f6ba )
by Mihail
04:15
created
Apps/Model/Front/Profile/FormIgnoreDelete.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -15,6 +15,9 @@
 block discarded – undo
15 15
     private $_user;
16 16
     private $_target_id;
17 17
 
18
+    /**
19
+     * @param string $target_id
20
+     */
18 21
     public function __construct(iUser $user, $target_id)
19 22
     {
20 23
         $this->_user = $user;
Please login to merge, or discard this patch.
Apps/Model/Front/Profile/FormWallPost.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Apps\Model\Front\Profile;
4 4
 
5
-use Apps\ActiveRecord\Blacklist;
6 5
 use Apps\ActiveRecord\WallPost as WallRecords;
7 6
 use Ffcms\Core\App;
8 7
 use Ffcms\Core\Interfaces\iUser;
Please login to merge, or discard this patch.
Apps/Model/Front/User/FormLogin.php 1 patch
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.
Apps/ActiveRecord/User.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         }
24 24
 
25 25
         // convert id to real integer
26
-        $user_id = (int)$user_id;
26
+        $user_id = (int) $user_id;
27 27
 
28 28
         if (!Obj::isInt($user_id) || $user_id < 1) {
29 29
             return null;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function getId()
53 53
     {
54
-        return (int)$this->id;
54
+        return (int) $this->id;
55 55
     }
56 56
 
57 57
     /**
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     {
74 74
         // get data from session
75 75
         $session_token = MainApp::$Session->get('ff_user_token', null);
76
-        $session_id = (int)MainApp::$Session->get('ff_user_id', 0);
76
+        $session_id = (int) MainApp::$Session->get('ff_user_id', 0);
77 77
 
78 78
         // validate session data
79 79
         if (null === $session_token || $session_id < 1 || Str::length($session_token) < 64) {
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         }
108 108
 
109 109
         // convert id to real integer
110
-        $id = (int)$id;
110
+        $id = (int) $id;
111 111
 
112 112
         $find = MainApp::$Memory->get('user.counter.cache.' . $id);
113 113
         if ($find === null) {
Please login to merge, or discard this patch.
Apps/Controller/Admin/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
         $search = \Apps\ActiveRecord\App::where('sys_name', '=', $controller_name)->first();
27 27
 
28
-        if ($search === null || (int)$search->id < 1) {
28
+        if ($search === null || (int) $search->id < 1) {
29 29
             throw new ForbiddenException();
30 30
         }
31 31
 
Please login to merge, or discard this patch.
Apps/Controller/Admin/Content.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function actionIndex()
33 33
     {
34 34
         // set current page and offset
35
-        $page = (int)App::$Request->query->get('page');
35
+        $page = (int) App::$Request->query->get('page');
36 36
         $offset = $page * self::ITEM_PER_PAGE;
37 37
 
38 38
         $query = null;
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         if ($type === 'trash') {
42 42
             $query = ContentEntity::onlyTrashed();
43 43
         } elseif (Obj::isLikeInt($type)) { // sounds like category id ;)
44
-            $query = ContentEntity::where('category_id', '=', (int)$type);
44
+            $query = ContentEntity::where('category_id', '=', (int) $type);
45 45
         } else {
46 46
             $query = new ContentEntity();
47 47
             $type = 'all';
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         if ($model->send() && $model->validate()) {
184 184
             // remove all trashed items
185 185
             foreach ($records->get() as $item) {
186
-                $galleryPath = '/upload/gallery/' . (int)$item->id;
186
+                $galleryPath = '/upload/gallery/' . (int) $item->id;
187 187
                 if (Directory::exist($galleryPath)) {
188 188
                     Directory::remove($galleryPath);
189 189
                 }
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     public function actionCategoryupdate($id = null)
254 254
     {
255 255
         // get owner id for new rows
256
-        $parentId = (int)App::$Request->query->get('parent');
256
+        $parentId = (int) App::$Request->query->get('parent');
257 257
 
258 258
         // get relation and pass to model
259 259
         $record = ContentCategory::findOrNew($id);
Please login to merge, or discard this patch.
Apps/Controller/Admin/Profile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         $query = new ProfileRecords();
26 26
 
27 27
         // set current page and offset
28
-        $page = (int)App::$Request->query->get('page');
28
+        $page = (int) App::$Request->query->get('page');
29 29
         $offset = $page * self::ITEM_PER_PAGE;
30 30
 
31 31
         // build pagination
Please login to merge, or discard this patch.
Apps/Controller/Admin/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         $query = new UserRecords();
27 27
 
28 28
         // set current page and offset
29
-        $page = (int)App::$Request->query->get('page');
29
+        $page = (int) App::$Request->query->get('page');
30 30
         $offset = $page * self::ITEM_PER_PAGE;
31 31
 
32 32
         // build pagination
Please login to merge, or discard this patch.
Apps/Controller/Api/Content.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@
 block discarded – undo
26 26
         parent::before();
27 27
         $configs = AppRecord::getConfigs('app', 'Content');
28 28
         // prevent null-type config data
29
-        if ((int)$configs['gallerySize'] > 0) {
30
-            $this->maxSize = (int)$configs['gallerySize'] * 1024;
29
+        if ((int) $configs['gallerySize'] > 0) {
30
+            $this->maxSize = (int) $configs['gallerySize'] * 1024;
31 31
         }
32 32
 
33
-        if ((int)$configs['galleryResize'] > 0) {
34
-            $this->maxResize = (int)$configs['galleryResize'];
33
+        if ((int) $configs['galleryResize'] > 0) {
34
+            $this->maxResize = (int) $configs['galleryResize'];
35 35
         }
36 36
     }
37 37
 
Please login to merge, or discard this patch.