@@ -27,7 +27,7 @@ |
||
27 | 27 | public function afterAction($action, $result) |
28 | 28 | { |
29 | 29 | if ($action->id == 'view') { |
30 | - $modelId = $action->controller->actionParams['id']; |
|
30 | + $modelId = $action->controller->actionParams[ 'id' ]; |
|
31 | 31 | Feedback::fixReadStatus((int)$modelId); |
32 | 32 | } |
33 | 33 |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function init() |
36 | 36 | { |
37 | - $this->recaptchaDriver = new ReCaptcha(Yii::$app->params['captcha']['secret_key']); |
|
37 | + $this->recaptchaDriver = new ReCaptcha(Yii::$app->params[ 'captcha' ][ 'secret_key' ]); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | public function verbs() |
72 | 72 | { |
73 | 73 | return [ |
74 | - 'validate' => ['POST'] |
|
74 | + 'validate' => [ 'POST' ] |
|
75 | 75 | ]; |
76 | 76 | } |
77 | 77 |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | public function verbs() |
58 | 58 | { |
59 | 59 | return [ |
60 | - 'send' => ['POST'] |
|
60 | + 'send' => [ 'POST' ] |
|
61 | 61 | ]; |
62 | 62 | } |
63 | 63 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $feedback->setScenario(Feedback::SCENARIO_FEEDBACK); |
98 | 98 | $feedback->setAttributes($request->post(), false); |
99 | 99 | |
100 | - if ($feedback->contact(Yii::$app->params['adminEmail'])) { |
|
100 | + if ($feedback->contact(Yii::$app->params[ 'adminEmail' ])) { |
|
101 | 101 | |
102 | 102 | return $this->getSuccessResponse(Yii::t('feedback', 'You have successfully sent your message.')); |
103 | 103 | } else { |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | private static function setUserStatus(TableSchema $settingsTableSchema, $settings, IdentityInterface $user): void |
64 | 64 | { |
65 | 65 | if (in_array('initUserStatus', $settingsTableSchema->columnNames)) { |
66 | - $user->status = is_array($settings) && null !== $settings['initUserStatus'] ? |
|
67 | - $settings['initUserStatus'] : self::INIT_USER_STATUS; |
|
66 | + $user->status = is_array($settings) && null !== $settings[ 'initUserStatus' ] ? |
|
67 | + $settings[ 'initUserStatus' ] : self::INIT_USER_STATUS; |
|
68 | 68 | $user->save(); |
69 | 69 | } else { |
70 | 70 | Yii::error('Field "initUserStatus" does not exists in "settings" table to set initial user status.'); |
@@ -93,11 +93,11 @@ discard block |
||
93 | 93 | ]); |
94 | 94 | } |
95 | 95 | |
96 | - if (!is_array($settings) || null === $settings['initUserRole']) { |
|
96 | + if (!is_array($settings) || null === $settings[ 'initUserRole' ]) { |
|
97 | 97 | $initUserRole = self::INIT_USER_ROLE; |
98 | 98 | Yii::error('Can not get field value of "initUserRole" from "settings" table to set initial user role.'); |
99 | 99 | } else { |
100 | - $initUserRole = $settings['initUserRole']; |
|
100 | + $initUserRole = $settings[ 'initUserRole' ]; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | $authManager->assign( |
@@ -30,11 +30,11 @@ |
||
30 | 30 | $fields = array('HTTP_CLIENT_IP', 'HTTP_X_REAL_IP', 'HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR'); |
31 | 31 | |
32 | 32 | $ip = "0.0.0.0"; |
33 | - foreach($fields as $k) |
|
33 | + foreach ($fields as $k) |
|
34 | 34 | { |
35 | - if(!empty($_SERVER[$k]) && ip2long($_SERVER[$k]) != false) |
|
35 | + if (!empty($_SERVER[ $k ]) && ip2long($_SERVER[ $k ]) != false) |
|
36 | 36 | { |
37 | - $ip = $_SERVER[$k]; |
|
37 | + $ip = $_SERVER[ $k ]; |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 |