@@ -23,7 +23,7 @@ |
||
23 | 23 | $record = new Invite(); |
24 | 24 | |
25 | 25 | // set current page num and offset |
26 | - $page = (int)$this->request->query->get('page', 0); |
|
26 | + $page = (int) $this->request->query->get('page', 0); |
|
27 | 27 | $offset = $page * self::ITEM_PER_PAGE; |
28 | 28 | |
29 | 29 | // prepare pagination data |
@@ -91,18 +91,18 @@ discard block |
||
91 | 91 | $user = App::$User->identity(); |
92 | 92 | // user is not authed ? |
93 | 93 | if ($user === null || !App::$User->isAuth()) { |
94 | - $redirectUrl = App::$Alias->scriptUrl . '/user/login'; |
|
94 | + $redirectUrl = App::$Alias->scriptUrl.'/user/login'; |
|
95 | 95 | App::$Response->redirect($redirectUrl, true); |
96 | 96 | exit(); |
97 | 97 | } |
98 | 98 | |
99 | - $permission = env_name . '/' . App::$Request->getController() . '/' . App::$Request->getAction(); |
|
99 | + $permission = env_name.'/'.App::$Request->getController().'/'.App::$Request->getAction(); |
|
100 | 100 | |
101 | 101 | // doesn't have permission? get the f*ck out |
102 | 102 | if (!$user->role->can($permission)) { |
103 | 103 | App::$Session->invalidate(); |
104 | 104 | |
105 | - $redirectUrl = App::$Alias->scriptUrl . '/user/login'; |
|
105 | + $redirectUrl = App::$Alias->scriptUrl.'/user/login'; |
|
106 | 106 | App::$Response->redirect($redirectUrl, true); |
107 | 107 | exit(); |
108 | 108 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | */ |
152 | 152 | public function getConfigs(): ?array |
153 | 153 | { |
154 | - $configs = $this->type === 'widget' ? (array)$this->widget->configs : (array)$this->application->configs; |
|
154 | + $configs = $this->type === 'widget' ? (array) $this->widget->configs : (array) $this->application->configs; |
|
155 | 155 | foreach ($configs as $cfg => $value) { |
156 | 156 | if (Any::isInt($value)) { |
157 | 157 | $configs[$cfg] = $value; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $allCfg['adminEmail'] = $email; |
125 | 125 | $allCfg['baseDomain'] = $domain; |
126 | 126 | $output->writeln('Generate security cookies for debug panel'); |
127 | - $allCfg['debug']['cookie']['key'] = 'fdebug_' . Crypt::randomString(mt_rand(8, 32)); |
|
127 | + $allCfg['debug']['cookie']['key'] = 'fdebug_'.Crypt::randomString(mt_rand(8, 32)); |
|
128 | 128 | $allCfg['debug']['cookie']['value'] = Crypt::randomString(mt_rand(32, 128)); |
129 | 129 | // write config data |
130 | 130 | $writeCfg = Console::$Properties->writeConfig('default', $allCfg); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | return; |
134 | 134 | } |
135 | 135 | File::write('/Private/Install/install.lock', 'Install is locked'); |
136 | - $output->writeln('Congratulations! FFCMS are successful installed. Used version: ' . Version::VERSION . ' since ' . Version::DATE); |
|
136 | + $output->writeln('Congratulations! FFCMS are successful installed. Used version: '.Version::VERSION.' since '.Version::DATE); |
|
137 | 137 | $output->writeln(''); |
138 | 138 | $output->writeln('> Please, use "php console.php main:adduser" to add admin account(set role=4) or you are unavailable to manage cms.'); |
139 | 139 | } |
@@ -105,14 +105,14 @@ |
||
105 | 105 | $cfg['baseDomain'] = $this->baseDomain; |
106 | 106 | $cfg['database'] = $this->db; |
107 | 107 | $cfg['singleLanguage'] = $this->singleLanguage; |
108 | - $cfg['multiLanguage'] = (bool)$this->multiLanguage; |
|
109 | - $cfg['passwordSalt'] = '$2a$07$' . Str::randomLatinNumeric(mt_rand(21, 30)) . '$'; |
|
110 | - $cfg['debug']['cookie']['key'] = 'fdebug_' . Crypt::randomString(mt_rand(4, 16)); |
|
108 | + $cfg['multiLanguage'] = (bool) $this->multiLanguage; |
|
109 | + $cfg['passwordSalt'] = '$2a$07$'.Str::randomLatinNumeric(mt_rand(21, 30)).'$'; |
|
110 | + $cfg['debug']['cookie']['key'] = 'fdebug_'.Crypt::randomString(mt_rand(4, 16)); |
|
111 | 111 | $cfg['debug']['cookie']['value'] = Crypt::randomString(mt_rand(32, 128)); |
112 | 112 | $cfg['mail'] = $this->mail; |
113 | 113 | |
114 | 114 | // initialize migrations table |
115 | - App::$Database->getConnection('install')->getSchemaBuilder()->create('migrations', function ($table) { |
|
115 | + App::$Database->getConnection('install')->getSchemaBuilder()->create('migrations', function($table) { |
|
116 | 116 | $table->increments('id'); |
117 | 117 | $table->string('migration', 128)->unique(); |
118 | 118 | $table->timestamps(); |
@@ -7,7 +7,7 @@ |
||
7 | 7 | <?php |
8 | 8 | $menu = $this->bootstrap()->nav('ul', ['class' => 'nav-tabs nav-fill']) |
9 | 9 | ->menu(['text' => __('User list'), 'link' => ['user/index']]); |
10 | -if ((int)$configs['registrationType'] === 0) { |
|
10 | +if ((int) $configs['registrationType'] === 0) { |
|
11 | 11 | $menu->menu(['text' => __('Invitation list'), 'link' => ['user/invitelist']]); |
12 | 12 | } |
13 | 13 | $menu->menu(['text' => __('Role management'), 'link' => ['user/rolelist']]) |
@@ -32,7 +32,7 @@ |
||
32 | 32 | ['text' => $model->type] |
33 | 33 | ])->row([ |
34 | 34 | ['text' => $model->getLabel('reg_exp')], |
35 | - ['text' => ($model->reg_cond == 0 ? '!' : null) . 'preg_match("'.$model->reg_exp.'", $input)'] |
|
35 | + ['text' => ($model->reg_cond == 0 ? '!' : null).'preg_match("'.$model->reg_exp.'", $input)'] |
|
36 | 36 | ])->display(); |
37 | 37 | ?> |
38 | 38 | </div> |
@@ -26,7 +26,7 @@ |
||
26 | 26 | $query = Profile::with(['user']); |
27 | 27 | |
28 | 28 | // set current page and offset |
29 | - $page = (int)$this->request->query->get('page'); |
|
29 | + $page = (int) $this->request->query->get('page'); |
|
30 | 30 | $offset = $page * self::ITEM_PER_PAGE; |
31 | 31 | |
32 | 32 | // count total items count for pagination builder |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | public function __construct(ContentCategory $record, $dependId = null) |
37 | 37 | { |
38 | 38 | $this->_record = $record; |
39 | - $this->_tmpDependId = (int)$dependId; |
|
39 | + $this->_tmpDependId = (int) $dependId; |
|
40 | 40 | parent::__construct(); |
41 | 41 | } |
42 | 42 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | ]; |
114 | 114 | |
115 | 115 | // general category |
116 | - if ($this->_new === false && (int)$this->_record->id === 1) { |
|
116 | + if ($this->_new === false && (int) $this->_record->id === 1) { |
|
117 | 117 | $rules[] = ['path', 'used']; |
118 | 118 | } else { |
119 | 119 | $rules[] = ['path', 'required']; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $rules[] = ['path', 'reverse_match', '/[\/\'~`\!@#\$%\^&\*\(\)+=\{\}\[\]\|;:"\<\>,\?\\\]/']; |
123 | 123 | } |
124 | 124 | |
125 | - $rules[] = ['title.' . App::$Request->getLanguage(), 'required']; |
|
125 | + $rules[] = ['title.'.App::$Request->getLanguage(), 'required']; |
|
126 | 126 | |
127 | 127 | |
128 | 128 | return $rules; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | { |
136 | 136 | $this->_record->title = $this->title; |
137 | 137 | $this->_record->description = $this->description; |
138 | - $savePath = trim($this->_pathNested . '/' . $this->path, '/'); |
|
138 | + $savePath = trim($this->_pathNested.'/'.$this->path, '/'); |
|
139 | 139 | $this->_record->path = $savePath; |
140 | 140 | $this->_record->configs = $this->configs; |
141 | 141 | $this->_record->save(); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | // build path with owner category |
171 | 171 | $this->_pathNested = $owner->path; |
172 | 172 | if (Str::length($this->_pathNested) > 0) { |
173 | - $path = $this->_pathNested . '/' . $path; |
|
173 | + $path = $this->_pathNested.'/'.$path; |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | // make select for check |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | <h1><?= __('Category list') ?></h1> |
26 | 26 | <div class="row"> |
27 | 27 | <div class="col-md-12"> |
28 | - <?= Url::a(['content/categoryupdate'], '<i class="fa fa-plus"></i> ' . __('Add category'), ['class' => 'btn btn-primary', 'html' => true]) ?> |
|
28 | + <?= Url::a(['content/categoryupdate'], '<i class="fa fa-plus"></i> '.__('Add category'), ['class' => 'btn btn-primary', 'html' => true]) ?> |
|
29 | 29 | </div> |
30 | 30 | </div> |
31 | 31 | <div class="table-responsive"> |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | <tr> |
57 | 57 | <td> |
58 | 58 | <div class="row"> |
59 | - <div class="d-none d-md-block col-md-<?= $offset ?> col-xs-<?= $offset+2 ?> " style="border-bottom: 2px solid #8a8a8a;height: 1px;padding-top: 10px;"></div> |
|
60 | - <div class="col-md-<?= $set ?> col-xs-<?= $set-2 ?>"> |
|
59 | + <div class="d-none d-md-block col-md-<?= $offset ?> col-xs-<?= $offset + 2 ?> " style="border-bottom: 2px solid #8a8a8a;height: 1px;padding-top: 10px;"></div> |
|
60 | + <div class="col-md-<?= $set ?> col-xs-<?= $set - 2 ?>"> |
|
61 | 61 | <?= $row->getLocaled('title') ?> |
62 | 62 | <sup>id: <?= $row->id ?></sup> |
63 | 63 | <span class="badge badge-secondary">/<?= $row->path ?></span> |