@@ -227,12 +227,12 @@ |
||
227 | 227 | // build sitemap from content items via business model |
228 | 228 | $sitemap = new EntityBuildMap($langs); |
229 | 229 | foreach ($profiles->get() as $user) { |
230 | - $sitemap->add('profile/show/' . $user->user_id, $user->updated_at, 'weekly', 0.2); |
|
230 | + $sitemap->add('profile/show/'.$user->user_id, $user->updated_at, 'weekly', 0.2); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | try { |
234 | 234 | $sitemap->save('profile'); |
235 | - } catch (SyntaxException $e){} |
|
235 | + } catch (SyntaxException $e) {} |
|
236 | 236 | } |
237 | 237 | |
238 | 238 | /** |
@@ -42,7 +42,7 @@ |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | // get page index and current user object |
45 | - $page = (int)$this->request->query->get('page', 0); |
|
45 | + $page = (int) $this->request->query->get('page', 0); |
|
46 | 46 | $offset = $page * $this->_notifyPerPage; |
47 | 47 | $user = App::$User->identity(); |
48 | 48 |
@@ -30,10 +30,10 @@ |
||
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; |
@@ -30,9 +30,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
99 | 99 | \ No newline at end of file |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | // set user id from ?id= get param if form not sended |
43 | 43 | if (!$model->send()) { |
44 | - $uid = (int)$this->request->query->get('id'); |
|
44 | + $uid = (int) $this->request->query->get('id'); |
|
45 | 45 | if ($uid > 0) { |
46 | 46 | $model->id = $uid; |
47 | 47 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | // get blocked users |
60 | 60 | $query = Blacklist::where('user_id', '=', $user->getId()); |
61 | 61 | |
62 | - $page = (int)$this->request->query->get('page'); |
|
62 | + $page = (int) $this->request->query->get('page'); |
|
63 | 63 | $offset = $page * $this->_blockPerPage; |
64 | 64 | |
65 | 65 | // build pagination |
@@ -57,7 +57,7 @@ |
||
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', [ |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | public function show($userId) |
32 | 32 | { |
33 | 33 | $cfg = $this->application->configs; |
34 | - if (!(bool)$cfg['guestView'] && !App::$User->isAuth()) { |
|
34 | + if (!(bool) $cfg['guestView'] && !App::$User->isAuth()) { |
|
35 | 35 | throw new ForbiddenException(__('You must login to view other profile')); |
36 | 36 | } |
37 | 37 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | App::$Session->getFlashBag()->add('error', __('This user are in your black list or you are in blacklist!')); |
55 | 55 | } else { |
56 | 56 | // check if message added |
57 | - if ($wallModel->makePost($targetPersone, $viewerPersone, (int)$cfg['delayBetweenPost'])) { |
|
57 | + if ($wallModel->makePost($targetPersone, $viewerPersone, (int) $cfg['delayBetweenPost'])) { |
|
58 | 58 | App::$Session->getFlashBag()->add('success', __('The message was successful posted!')); |
59 | 59 | } else { |
60 | 60 | App::$Session->getFlashBag()->add('warning', __('Posting message was failed! Please, wait few seconds')); |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | } |
65 | 65 | |
66 | 66 | // pagination and query params |
67 | - $wallPage = (int)$this->request->query->get('page'); |
|
68 | - $wallItems = (int)$cfg['wallPostOnPage']; |
|
67 | + $wallPage = (int) $this->request->query->get('page'); |
|
68 | + $wallItems = (int) $cfg['wallPostOnPage']; |
|
69 | 69 | $wallOffset = $wallPage * $wallItems; |
70 | 70 | |
71 | 71 | // get wall posts by target user_id |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | 'notify' => App::$Session->getFlashBag()->all(), |
96 | 96 | 'wallRecords' => $wallRecords, |
97 | 97 | 'pagination' => $wallPagination, |
98 | - 'ratingOn' => (int)$cfg['rating'] === 1 |
|
98 | + 'ratingOn' => (int) $cfg['rating'] === 1 |
|
99 | 99 | ]); |
100 | 100 | } |
101 | 101 | } |
102 | 102 | \ No newline at end of file |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | // check if request is sended |
42 | 42 | if ($model->send() && $model->validate()) { |
43 | 43 | // get records from db |
44 | - $records = ProfileRecords::where('nick', 'like', '%' . $model->query . '%'); |
|
45 | - $page = (int)$this->request->query->get('page'); |
|
46 | - $userPerPage = (int)$cfgs['usersOnPage']; |
|
44 | + $records = ProfileRecords::where('nick', 'like', '%'.$model->query.'%'); |
|
45 | + $page = (int) $this->request->query->get('page'); |
|
46 | + $userPerPage = (int) $cfgs['usersOnPage']; |
|
47 | 47 | if ($userPerPage < 1) { |
48 | 48 | $userPerPage = 1; |
49 | 49 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | 'model' => $model, |
68 | 68 | 'records' => $records, |
69 | 69 | 'pagination' => $pagination, |
70 | - 'ratingOn' => (int)$cfgs['rating'] |
|
70 | + 'ratingOn' => (int) $cfgs['rating'] |
|
71 | 71 | ]); |
72 | 72 | } |
73 | 73 | } |
74 | 74 | \ No newline at end of file |