Passed
Push — master ( bd2e79...1bdae3 )
by Mihail
05:23
created
Widgets/Front/Newcontent/Newcontent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,15 +35,15 @@
 block discarded – undo
35 35
 
36 36
         // check cache is defined
37 37
         if (!$this->cache || !Any::isInt($this->cache)) {
38
-            $this->cache = (int)$cfg['cache'];
38
+            $this->cache = (int) $cfg['cache'];
39 39
         }
40 40
 
41 41
         // check item count is defined
42
-        if (!$this->count|| !Any::isInt($this->count)) {
43
-            $this->count = (int)$cfg['count'];
42
+        if (!$this->count || !Any::isInt($this->count)) {
43
+            $this->count = (int) $cfg['count'];
44 44
         }
45 45
 
46
-        $this->_cacheName = 'widget.newcontent.' . $this->createStringClassSnapshotHash();
46
+        $this->_cacheName = 'widget.newcontent.'.$this->createStringClassSnapshotHash();
47 47
     }
48 48
 
49 49
     /**
Please login to merge, or discard this patch.
Apps/Controller/Front/Profile/ActionFeed.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@
 block discarded – undo
30 30
         /** @var array $cfg */
31 31
         $cfg = $this->application->configs;
32 32
         // get pagination page id and calc offset
33
-        $page = (int)$this->request->query->get('page');
33
+        $page = (int) $this->request->query->get('page');
34 34
         $items = 10;
35
-        if ((int)$cfg['wallPostOnFeed'] >= 1) {
36
-            $items = (int)$cfg['wallPostOnFeed'];
35
+        if ((int) $cfg['wallPostOnFeed'] >= 1) {
36
+            $items = (int) $cfg['wallPostOnFeed'];
37 37
         }
38 38
 
39 39
         $offset = $page * $items;
Please login to merge, or discard this patch.
Apps/Controller/Front/Profile/ActionWallDelete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         $wallModel = new FormWallPostDelete($wallPost);
58 58
         if ($wallModel->send() && $wallModel->validate()) {
59 59
             $wallModel->make();
60
-            $this->response->redirect('profile/show/' . $wallPost->target_id);
60
+            $this->response->redirect('profile/show/'.$wallPost->target_id);
61 61
         }
62 62
 
63 63
         return $this->view->render('wall_delete', [
Please login to merge, or discard this patch.
Apps/Controller/Front/Profile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@
 block discarded – undo
158 158
         // build sitemap from content items via business model
159 159
         $sitemap = new EntityBuildMap($langs);
160 160
         foreach ($profiles->get() as $user) {
161
-            $sitemap->add('profile/show/' . $user->user_id, $user->updated_at, 'weekly', 0.2);
161
+            $sitemap->add('profile/show/'.$user->user_id, $user->updated_at, 'weekly', 0.2);
162 162
         }
163 163
 
164 164
         try {
Please login to merge, or discard this patch.
Apps/Controller/Front/Profile/ActionNotifications.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         }
41 41
 
42 42
         // get page index and current user object
43
-        $page = (int)$this->request->query->get('page', 0);
43
+        $page = (int) $this->request->query->get('page', 0);
44 44
         $offset = $page * static::NOTIFY_PER_PAGE;
45 45
         $user = App::$User->identity();
46 46
 
Please login to merge, or discard this patch.
Apps/Controller/Front/Profile/ActionIgnore.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
         // set user id from ?id= get param if form not sended
41 41
         if (!$model->send()) {
42
-            $uid = (int)$this->request->query->get('id');
42
+            $uid = (int) $this->request->query->get('id');
43 43
             if ($uid > 0) {
44 44
                 $model->id = $uid;
45 45
             }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         // get blocked users
58 58
         $query = Blacklist::where('user_id', '=', $user->getId());
59 59
 
60
-        $page = (int)$this->request->query->get('page');
60
+        $page = (int) $this->request->query->get('page');
61 61
         $offset = $page * static::BLOCK_PER_PAGE;
62 62
 
63 63
         // build pagination
Please login to merge, or discard this patch.
Apps/Controller/Front/Profile/ActionIndex.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
     {
31 31
         $records = null;
32 32
         // set current page and offset
33
-        $page = (int)$this->request->query->get('page', 0);
33
+        $page = (int) $this->request->query->get('page', 0);
34 34
         $cfgs = $this->application->configs;
35
-        $userPerPage = (int)$cfgs['usersOnPage'];
35
+        $userPerPage = (int) $cfgs['usersOnPage'];
36 36
         if ($userPerPage < 1) {
37 37
             $userPerPage = 1;
38 38
         }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         switch ($name) {
42 42
             case 'rating': // rating list, order by rating DESC
43 43
                 // check if rating is enabled
44
-                if ((int)$cfgs['rating'] !== 1) {
44
+                if ((int) $cfgs['rating'] !== 1) {
45 45
                     throw new NotFoundException();
46 46
                 }
47 47
                 $records = (new ProfileRecords())->orderBy('rating', 'DESC');
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                 if (Str::likeEmpty($value)) {
51 51
                     throw new NotFoundException();
52 52
                 }
53
-                $records = (new ProfileRecords())->where('hobby', 'like', '%' . $value . '%');
53
+                $records = (new ProfileRecords())->where('hobby', 'like', '%'.$value.'%');
54 54
                 break;
55 55
             case 'city':
56 56
                 if (Str::likeEmpty($value)) {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                 if ($value === null || !Any::isInt($value)) {
63 63
                     throw new NotFoundException();
64 64
                 }
65
-                $records = (new ProfileRecords())->where('birthday', 'like', $value . '-%');
65
+                $records = (new ProfileRecords())->where('birthday', 'like', $value.'-%');
66 66
                 break;
67 67
             case 'all':
68 68
                 $records = (new ProfileRecords())->orderBy('id', 'DESC');
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             'pagination' => $pagination,
93 93
             'id' => $name,
94 94
             'add' => $value,
95
-            'ratingOn' => (int)$cfgs['rating']
95
+            'ratingOn' => (int) $cfgs['rating']
96 96
         ]);
97 97
     }
98 98
 }
Please login to merge, or discard this patch.
Apps/Controller/Front/Profile/ActionSearch.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
         // check if request is sended
41 41
         if ($model->send() && $model->validate()) {
42 42
             // get records from db
43
-            $records = ProfileRecords::where('nick', 'like', '%' . $model->query . '%');
44
-            $page = (int)$this->request->query->get('page');
45
-            $userPerPage = (int)$cfgs['usersOnPage'];
43
+            $records = ProfileRecords::where('nick', 'like', '%'.$model->query.'%');
44
+            $page = (int) $this->request->query->get('page');
45
+            $userPerPage = (int) $cfgs['usersOnPage'];
46 46
             if ($userPerPage < 1) {
47 47
                 $userPerPage = 1;
48 48
             }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             'model' => $model,
67 67
             'records' => $records,
68 68
             'pagination' => $pagination,
69
-            'ratingOn' => (int)$cfgs['rating']
69
+            'ratingOn' => (int) $cfgs['rating']
70 70
         ]);
71 71
     }
72 72
 }
Please login to merge, or discard this patch.
Apps/Controller/Front/Content.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
         }
84 84
 
85 85
         // build sitemap items using iteration - 5000 rows per each one
86
-        $iterations = (int)($contentCount / static::SITEMAP_CONTENT_COUNT_ITERATION);
86
+        $iterations = (int) ($contentCount / static::SITEMAP_CONTENT_COUNT_ITERATION);
87 87
         for ($i = 0; $i <= $iterations; $i++) {
88 88
             // check if lifetime is expired for current sitemap index
89
-            $xmlTime = File::mTime('/upload/sitemap/content.' . $i . '.' . $langs[0] . '.xml');
89
+            $xmlTime = File::mTime('/upload/sitemap/content.'.$i.'.'.$langs[0].'.xml');
90 90
             $updateDelay = static::SITEMAP_UPDATE_DELAY * 60;
91 91
             $updateDelay += mt_rand(0, 1800); // +- 0-30 rand min for caching update
92 92
             // do not process if cache time is not expired
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                 $category = $content->getCategory();
105 105
                 $uri = '/content/read/';
106 106
                 if (!Str::likeEmpty($category->path)) {
107
-                    $uri .= $category->path . '/';
107
+                    $uri .= $category->path.'/';
108 108
                 }
109 109
                 $uri .= $content->path;
110 110
                 $sitemap->add($uri, $content->created_at, 'weekly', 0.7);
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
             // add categories
113 113
             $categories = ContentCategory::all();
114 114
             foreach ($categories as $item) {
115
-                if ((bool)$item->getProperty('showCategory')) {
116
-                    $uri = '/content/list/' . $item->path;
115
+                if ((bool) $item->getProperty('showCategory')) {
116
+                    $uri = '/content/list/'.$item->path;
117 117
                     $sitemap->add($uri, date('c'), 'daily', 0.9);
118 118
                 }
119 119
             }
120 120
             // save data to xml file
121
-            $sitemap->save('content.' . $i);
121
+            $sitemap->save('content.'.$i);
122 122
         }
123 123
     }
124 124
 }
Please login to merge, or discard this patch.