Passed
Push — master ( 3d6fe1...2c7b25 )
by Mihail
05:25
created
Private/Config/Default.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -1,40 +1,40 @@
 block discarded – undo
1 1
 <?php return [
2
-	'baseProto' => 'http',
3
-	'baseDomain' => 'ffcms.app',
4
-	'basePath' => '/',
5
-	'passwordSalt' => '$2a$07$2NJgci5A7NI9m2J9Ii92a1I3DiH6$',
6
-	'timezone' => 'Europe/Moscow',
7
-	'debug' => [
8
-		'all' => false,
9
-		'cookie' => [
10
-			'key' => 'fdebug_jepP2',
11
-			'value' => 'pOH1Kj18fHN7mk9a81F32eJbl9d3AeDjLC1g7poPGE22Ii6pI68P5B6O5hKMofnLPB0lFdpo2a2o78NhedjGA'
12
-		]
13
-	],
14
-	'theme' => [
15
-		'Front' => 'default',
16
-		'Admin' => 'default'
17
-	],
18
-	'database' => [
19
-		'driver' => 'mysql',
20
-		'host' => '127.0.0.1',
21
-		'username' => 'mysql',
22
-		'password' => 'mysql',
23
-		'database' => 'ffcms',
24
-		'prefix' => 'ffcms_',
25
-		'charset' => 'utf8',
26
-		'collation' => 'utf8_unicode_ci'
27
-	],
28
-	'adminEmail' => '[email protected]',
29
-	'baseLanguage' => 'en',
30
-	'multiLanguage' => true,
31
-	'singleLanguage' => 'en',
32
-	'languages' => [
33
-		'en',
34
-		'ru'
35
-	],
36
-	'languageDomainAlias' => false,
37
-	'gaClientId' => '570934480862-son8fr180fr6u6tlt9iqpjpoesngro0o.apps.googleusercontent.com',
38
-	'gaTrackId' => false,
39
-	'trustedProxy' => false
2
+    'baseProto' => 'http',
3
+    'baseDomain' => 'ffcms.app',
4
+    'basePath' => '/',
5
+    'passwordSalt' => '$2a$07$2NJgci5A7NI9m2J9Ii92a1I3DiH6$',
6
+    'timezone' => 'Europe/Moscow',
7
+    'debug' => [
8
+        'all' => false,
9
+        'cookie' => [
10
+            'key' => 'fdebug_jepP2',
11
+            'value' => 'pOH1Kj18fHN7mk9a81F32eJbl9d3AeDjLC1g7poPGE22Ii6pI68P5B6O5hKMofnLPB0lFdpo2a2o78NhedjGA'
12
+        ]
13
+    ],
14
+    'theme' => [
15
+        'Front' => 'default',
16
+        'Admin' => 'default'
17
+    ],
18
+    'database' => [
19
+        'driver' => 'mysql',
20
+        'host' => '127.0.0.1',
21
+        'username' => 'mysql',
22
+        'password' => 'mysql',
23
+        'database' => 'ffcms',
24
+        'prefix' => 'ffcms_',
25
+        'charset' => 'utf8',
26
+        'collation' => 'utf8_unicode_ci'
27
+    ],
28
+    'adminEmail' => '[email protected]',
29
+    'baseLanguage' => 'en',
30
+    'multiLanguage' => true,
31
+    'singleLanguage' => 'en',
32
+    'languages' => [
33
+        'en',
34
+        'ru'
35
+    ],
36
+    'languageDomainAlias' => false,
37
+    'gaClientId' => '570934480862-son8fr180fr6u6tlt9iqpjpoesngro0o.apps.googleusercontent.com',
38
+    'gaTrackId' => false,
39
+    'trustedProxy' => false
40 40
 ];
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
Private/Config/Cron.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php return [
2
-	'instances' => [
3
-		'Apps\Controller\Front\Content::buildSitemapSchedule' => 10800,
4
-		'Apps\Controller\Front\Profile::buildSitemapSchedule' => 10800
5
-	]
2
+    'instances' => [
3
+        'Apps\Controller\Front\Content::buildSitemapSchedule' => 10800,
4
+        'Apps\Controller\Front\Profile::buildSitemapSchedule' => 10800
5
+    ]
6 6
 ];
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/Controller/Front/Profile.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
         $records = null;
48 48
 
49 49
         // set current page and offset
50
-        $page = (int)App::$Request->query->get('page');
50
+        $page = (int) App::$Request->query->get('page');
51 51
         $cfgs = Serialize::decode($this->application->configs);
52
-        $userPerPage = (int)$cfgs['usersOnPage'];
52
+        $userPerPage = (int) $cfgs['usersOnPage'];
53 53
         if ($userPerPage < 1) {
54 54
             $userPerPage = 1;
55 55
         }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         switch ($filter_name) {
59 59
             case 'rating': // rating list, order by rating DESC
60 60
                 // check if rating is enabled
61
-                if ((int)$cfgs['rating'] !== 1) {
61
+                if ((int) $cfgs['rating'] !== 1) {
62 62
                     throw new NotFoundException();
63 63
                 }
64 64
                 $records = (new ProfileRecords())->orderBy('rating', 'DESC');
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                 if (Str::likeEmpty($filter_value)) {
68 68
                     throw new NotFoundException();
69 69
                 }
70
-                $records = (new ProfileRecords())->where('hobby', 'like', '%' . $filter_value . '%');
70
+                $records = (new ProfileRecords())->where('hobby', 'like', '%'.$filter_value.'%');
71 71
                 break;
72 72
             case 'city':
73 73
                 if (Str::likeEmpty($filter_value)) {
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                 if ($filter_value === null || !Obj::isLikeInt($filter_value)) {
80 80
                     throw new NotFoundException();
81 81
                 }
82
-                $records = (new ProfileRecords())->where('birthday', 'like', $filter_value . '-%');
82
+                $records = (new ProfileRecords())->where('birthday', 'like', $filter_value.'-%');
83 83
                 break;
84 84
             case 'all':
85 85
                 $records = (new ProfileRecords())->orderBy('id', 'DESC');
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             'pagination' => $pagination,
103 103
             'id' => $filter_name,
104 104
             'add' => $filter_value,
105
-            'ratingOn' => (int)$cfgs['rating']
105
+            'ratingOn' => (int) $cfgs['rating']
106 106
         ]);
107 107
     }
108 108
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     public function actionShow($userId)
119 119
     {
120 120
         $cfg = Serialize::decode($this->application->configs);
121
-        if ((int)$cfg['guestView'] !== 1 && !App::$User->isAuth()) {
121
+        if ((int) $cfg['guestView'] !== 1 && !App::$User->isAuth()) {
122 122
             throw new ForbiddenException(__('You must login to view other profile'));
123 123
         }
124 124
         // check if target exists
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                     App::$Session->getFlashBag()->add('error', __('This user are in your black list or you are in blacklist!'));
141 141
                 } else {
142 142
                     // check if message added
143
-                    if ($wallModel->makePost($targetPersone, $viewerPersone, (int)$cfg['delayBetweenPost'])) {
143
+                    if ($wallModel->makePost($targetPersone, $viewerPersone, (int) $cfg['delayBetweenPost'])) {
144 144
                         App::$Session->getFlashBag()->add('success', __('The message was successful posted!'));
145 145
                     } else {
146 146
                         App::$Session->getFlashBag()->add('warning', __('Posting message was failed! You need to wait some time...'));
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
 
152 152
         $query = $targetPersone->getWall(); // relation hasMany from users to walls
153 153
         // pagination and query params
154
-        $wallPage = (int)App::$Request->query->get('page');
155
-        $wallItems = (int)$cfg['wallPostOnPage'];
154
+        $wallPage = (int) App::$Request->query->get('page');
155
+        $wallItems = (int) $cfg['wallPostOnPage'];
156 156
         $wallOffset = $wallPage * $wallItems;
157 157
 
158 158
         // build pagination
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
             'notify' => App::$Session->getFlashBag()->all(),
175 175
             'wallRecords' => $wallRecords,
176 176
             'pagination' => $wallPagination,
177
-            'ratingOn' => (int)$cfg['rating'] === 1
177
+            'ratingOn' => (int) $cfg['rating'] === 1
178 178
         ]);
179 179
     }
180 180
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         $wallModel = new FormWallPostDelete($wallPost);
247 247
         if ($wallModel->send() && $wallModel->validate()) {
248 248
             $wallModel->make();
249
-            App::$Response->redirect('profile/show/' . $wallPost->target_id);
249
+            App::$Response->redirect('profile/show/'.$wallPost->target_id);
250 250
         }
251 251
 
252 252
         return App::$View->render('wall_delete', [
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 
352 352
         // set user id from ?id= get param if form not sended
353 353
         if (!$model->send()) {
354
-            $uid = (int)App::$Request->query->get('id');
354
+            $uid = (int) App::$Request->query->get('id');
355 355
             if ($uid > 0) {
356 356
                 $model->id = $uid;
357 357
             }
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
         // get blocked users
370 370
         $records = Blacklist::where('user_id', '=', $user->getId());
371 371
 
372
-        $page = (int)App::$Request->query->get('page');
372
+        $page = (int) App::$Request->query->get('page');
373 373
         $offset = $page * self::BLOCK_PER_PAGE;
374 374
 
375 375
         // build pagination
@@ -474,9 +474,9 @@  discard block
 block discarded – undo
474 474
         // check if request is sended
475 475
         if ($model->send() && $model->validate()) {
476 476
             // get records from db
477
-            $records = ProfileRecords::where('nick', 'like', '%' . $model->query . '%');
478
-            $page = (int)App::$Request->query->get('page');
479
-            $userPerPage = (int)$cfgs['usersOnPage'];
477
+            $records = ProfileRecords::where('nick', 'like', '%'.$model->query.'%');
478
+            $page = (int) App::$Request->query->get('page');
479
+            $userPerPage = (int) $cfgs['usersOnPage'];
480 480
             if ($userPerPage < 1) {
481 481
                 $userPerPage = 1;
482 482
             }
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
             'model' => $model->filter(),
499 499
             'records' => $records,
500 500
             'pagination' => $pagination,
501
-            'ratingOn' => (int)$cfgs['rating']
501
+            'ratingOn' => (int) $cfgs['rating']
502 502
         ]);
503 503
     }
504 504
 
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
         // build sitemap from content items via business model
523 523
         $sitemap = new EntityBuildMap($langs);
524 524
         foreach ($profiles->get() as $user) {
525
-            $sitemap->add('profile/show/' . $user->user_id, $user->updated_at, 'weekly', 0.2);
525
+            $sitemap->add('profile/show/'.$user->user_id, $user->updated_at, 'weekly', 0.2);
526 526
         }
527 527
 
528 528
         $sitemap->save('profile');
Please login to merge, or discard this patch.