@@ -32,7 +32,7 @@ |
||
32 | 32 | ])->row([ |
33 | 33 | ['text' => $model->getUser()->id], |
34 | 34 | ['text' => $model->getUser()->email], |
35 | - ['text' => $model->getUser()->profile->nick ?? 'id' . $model->getUser()->id], |
|
35 | + ['text' => $model->getUser()->profile->nick ?? 'id'.$model->getUser()->id], |
|
36 | 36 | ['text' => Date::convertToDatetime($model->getUser()->created_at, Date::FORMAT_TO_HOUR)], |
37 | 37 | ])->display() ?> |
38 | 38 | </div> |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | public static function boot(): void |
24 | 24 | { |
25 | - App::$Event->on(Main::SEARCH_EVENT_NAME, function ($model) { |
|
25 | + App::$Event->on(Main::SEARCH_EVENT_NAME, function($model) { |
|
26 | 26 | /** @var CollectionSearchResults $model */ |
27 | 27 | $records = User::with('profile') |
28 | 28 | ->search($model->getQuery()) |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | /** @var User[]|Collection $records */ |
33 | 33 | $records->each(function($item) use ($model) { |
34 | 34 | /** @var User $item */ |
35 | - $title = $item->email . '(id=' . $item->id . ')'; |
|
35 | + $title = $item->email.'(id='.$item->id.')'; |
|
36 | 36 | $text = App::$Translate->get('User', 'Email: %email%, nick: %nick%', [ |
37 | 37 | 'email' => $item->email, |
38 | - 'nick' => $item->profile->nick ?? 'id' . $item->id |
|
38 | + 'nick' => $item->profile->nick ?? 'id'.$item->id |
|
39 | 39 | ]); |
40 | 40 | |
41 | 41 | // initialize abstract response pattern |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $res->setTitle($title); |
44 | 44 | $res->setSnippet($text); |
45 | 45 | $res->setDate($item->created_at); |
46 | - $res->setRelevance((int)$item->relevance); |
|
46 | + $res->setRelevance((int) $item->relevance); |
|
47 | 47 | $res->setUrl('user/update', [$item->id]); |
48 | 48 | $res->setMarker('User'); |
49 | 49 |
@@ -30,11 +30,11 @@ |
||
30 | 30 | // check if search query passed |
31 | 31 | $query = $this->request->query->get('search', null); |
32 | 32 | if ($query && Any::isStr($query) && Str::length($query) > 1) { |
33 | - $record = $record->where('email', 'like', '%' . $query . '%'); |
|
33 | + $record = $record->where('email', 'like', '%'.$query.'%'); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | // set current page num and offset |
37 | - $page = (int)$this->request->query->get('page', 0); |
|
37 | + $page = (int) $this->request->query->get('page', 0); |
|
38 | 38 | $offset = $page * self::ITEM_PER_PAGE; |
39 | 39 | |
40 | 40 | // prepare pagination data |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | public function up() |
18 | 18 | { |
19 | 19 | // set nullable varchar type for token column |
20 | - $this->getSchema()->table('users', function($table){ |
|
20 | + $this->getSchema()->table('users', function($table) { |
|
21 | 21 | $table->string('approve_token', 128)->nullable()->default(null)->change(); |
22 | 22 | }); |
23 | 23 | // set approve_token = null where it like '0' str or '' |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | }); |
32 | 32 | } |
33 | 33 | if (!$this->getSchema()->hasColumn('comment_answers', 'app_relation_id')) { |
34 | - $this->getSchema()->table('comment_answers', function($table){ |
|
34 | + $this->getSchema()->table('comment_answers', function($table) { |
|
35 | 35 | $table->integer('app_relation_id')->unsigned()->default(0)->after('app_name'); |
36 | 36 | }); |
37 | 37 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | // @todo: add algo to find app_name & app_id for oldest comments |
43 | 43 | if ($this->getSchema()->hasColumn('comment_posts', 'pathway')) { |
44 | - $this->getSchema()->table('comment_posts', function($table){ |
|
44 | + $this->getSchema()->table('comment_posts', function($table) { |
|
45 | 45 | $table->dropColumn('pathway'); |
46 | 46 | }); |
47 | 47 | } |
@@ -1,47 +1,47 @@ |
||
1 | 1 | <?php return [ |
2 | - 'baseProto' => 'http', |
|
3 | - 'baseDomain' => 'ffcms.test', |
|
4 | - 'basePath' => '/', |
|
5 | - 'timezone' => 'Europe/Moscow', |
|
6 | - 'adminEmail' => false, |
|
7 | - 'debug' => [ |
|
8 | - 'all' => false, |
|
9 | - 'cookie' => [ |
|
10 | - 'key' => 'fdebug_39a435', |
|
11 | - 'value' => '6c6ceb041e1e890e0ce762c1861da2857443a908660d7b29174799624b5b1041fc3b5749250b7296ff306b422aabadb016' |
|
12 | - ] |
|
13 | - ], |
|
14 | - 'userCron' => false, |
|
15 | - 'testSuite' => false, |
|
16 | - 'theme' => [ |
|
17 | - 'Front' => 'default', |
|
18 | - 'Admin' => 'default' |
|
19 | - ], |
|
20 | - 'database' => [ |
|
21 | - 'driver' => 'mysql', |
|
22 | - 'host' => 'localhost', |
|
23 | - 'username' => 'mysql', |
|
24 | - 'password' => 'mysql', |
|
25 | - 'database' => 'ffcms', |
|
26 | - 'prefix' => 'ffcms_', |
|
27 | - 'charset' => 'utf8', |
|
28 | - 'collation' => 'utf8_unicode_ci' |
|
29 | - ], |
|
30 | - 'mail' => [ |
|
31 | - 'enable' => '0', |
|
32 | - 'host' => '', |
|
33 | - 'port' => '', |
|
34 | - 'user' => '', |
|
35 | - 'password' => '', |
|
36 | - 'encrypt' => '' |
|
37 | - ], |
|
38 | - 'baseLanguage' => 'en', |
|
39 | - 'multiLanguage' => true, |
|
40 | - 'singleLanguage' => 'en', |
|
41 | - 'languages' => [ |
|
42 | - 'en', |
|
43 | - 'ru' |
|
44 | - ], |
|
45 | - 'languageDomainAlias' => false, |
|
46 | - 'trustedProxy' => false |
|
2 | + 'baseProto' => 'http', |
|
3 | + 'baseDomain' => 'ffcms.test', |
|
4 | + 'basePath' => '/', |
|
5 | + 'timezone' => 'Europe/Moscow', |
|
6 | + 'adminEmail' => false, |
|
7 | + 'debug' => [ |
|
8 | + 'all' => false, |
|
9 | + 'cookie' => [ |
|
10 | + 'key' => 'fdebug_39a435', |
|
11 | + 'value' => '6c6ceb041e1e890e0ce762c1861da2857443a908660d7b29174799624b5b1041fc3b5749250b7296ff306b422aabadb016' |
|
12 | + ] |
|
13 | + ], |
|
14 | + 'userCron' => false, |
|
15 | + 'testSuite' => false, |
|
16 | + 'theme' => [ |
|
17 | + 'Front' => 'default', |
|
18 | + 'Admin' => 'default' |
|
19 | + ], |
|
20 | + 'database' => [ |
|
21 | + 'driver' => 'mysql', |
|
22 | + 'host' => 'localhost', |
|
23 | + 'username' => 'mysql', |
|
24 | + 'password' => 'mysql', |
|
25 | + 'database' => 'ffcms', |
|
26 | + 'prefix' => 'ffcms_', |
|
27 | + 'charset' => 'utf8', |
|
28 | + 'collation' => 'utf8_unicode_ci' |
|
29 | + ], |
|
30 | + 'mail' => [ |
|
31 | + 'enable' => '0', |
|
32 | + 'host' => '', |
|
33 | + 'port' => '', |
|
34 | + 'user' => '', |
|
35 | + 'password' => '', |
|
36 | + 'encrypt' => '' |
|
37 | + ], |
|
38 | + 'baseLanguage' => 'en', |
|
39 | + 'multiLanguage' => true, |
|
40 | + 'singleLanguage' => 'en', |
|
41 | + 'languages' => [ |
|
42 | + 'en', |
|
43 | + 'ru' |
|
44 | + ], |
|
45 | + 'languageDomainAlias' => false, |
|
46 | + 'trustedProxy' => false |
|
47 | 47 | ]; |
48 | 48 | \ No newline at end of file |