@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | use yii\bootstrap\ActiveForm; |
9 | 9 | |
10 | 10 | $this->title = Yii::t('site', 'Sign in'); |
11 | -$this->params['breadcrumbs'][] = $this->title; |
|
11 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
12 | 12 | ?> |
13 | 13 | <section id="login"> |
14 | 14 | <div class="container"> |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | 'layout' => 'horizontal', |
21 | 21 | 'fieldConfig' => [ |
22 | 22 | 'template' => "{label}\n<div class=\"col-lg-4\">{input}</div>\n<div class=\"col-lg-6\">{error}</div>", |
23 | - 'labelOptions' => ['class' => 'col-lg-2 control-label'], |
|
23 | + 'labelOptions' => [ 'class' => 'col-lg-2 control-label' ], |
|
24 | 24 | ], |
25 | 25 | ]); ?> |
26 | 26 | |
27 | - <?php echo $form->field($model, 'login')->textInput(['autofocus' => true])->label(Yii::t('site', 'Login')) ?> |
|
27 | + <?php echo $form->field($model, 'login')->textInput([ 'autofocus' => true ])->label(Yii::t('site', 'Login')) ?> |
|
28 | 28 | |
29 | 29 | <?php echo $form->field($model, 'password')->passwordInput()->label(Yii::t('site', 'Password')) ?> |
30 | 30 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | <div class="form-group"> |
36 | 36 | <div class="col-lg-offset-1 col-lg-5"> |
37 | - <?php echo Html::submitButton(Yii::t('app', 'Send'), ['class' => 'btn btn-primary', 'name' => 'login-button']) ?> |
|
37 | + <?php echo Html::submitButton(Yii::t('app', 'Send'), [ 'class' => 'btn btn-primary', 'name' => 'login-button' ]) ?> |
|
38 | 38 | </div> |
39 | 39 | <div class="col-lg-6"> |
40 | 40 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | /* @var $this yii\web\View */ |
4 | 4 | |
5 | 5 | $this->title = Yii::t('site', 'Register'); |
6 | -$this->params['breadcrumbs'][] = $this->title; |
|
6 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
7 | 7 | ?> |
8 | 8 | <div class="container"> |
9 | 9 | <div class="row"> |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | /* @var $model app\models\RegForm */ |
10 | 10 | |
11 | 11 | $this->title = Yii::t('site', 'Register'); |
12 | -$this->params['breadcrumbs'][] = $this->title; |
|
12 | +$this->params[ 'breadcrumbs' ][ ] = $this->title; |
|
13 | 13 | ?> |
14 | 14 | <section id="registration"> |
15 | 15 | <div class="container"> |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | 'layout' => 'horizontal', |
22 | 22 | 'fieldConfig' => [ |
23 | 23 | 'template' => "{label}\n<div class=\"col-lg-4\">{input}</div>\n<div class=\"col-lg-6\">{error}</div>", |
24 | - 'labelOptions' => ['class' => 'col-lg-2 control-label'], |
|
24 | + 'labelOptions' => [ 'class' => 'col-lg-2 control-label' ], |
|
25 | 25 | ], |
26 | 26 | ]); ?> |
27 | 27 | |
28 | - <?php echo $form->field($model, 'first_name')->textInput(['autofocus' => true])->label(Yii::t('site', 'Name')) ?> |
|
28 | + <?php echo $form->field($model, 'first_name')->textInput([ 'autofocus' => true ])->label(Yii::t('site', 'Name')) ?> |
|
29 | 29 | |
30 | 30 | <?php echo $form->field($model, 'email')->textInput()->label(Yii::t('site', 'Email')) ?> |
31 | 31 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | <div class="form-group"> |
45 | 45 | <div class="col-lg-offset-1 col-lg-5"> |
46 | - <?php echo Html::submitButton(Yii::t('app', 'Send'), ['class' => 'btn btn-primary', 'name' => 'register-button']) ?> |
|
46 | + <?php echo Html::submitButton(Yii::t('app', 'Send'), [ 'class' => 'btn btn-primary', 'name' => 'register-button' ]) ?> |
|
47 | 47 | </div> |
48 | 48 | <div class="col-lg-6"> |
49 | 49 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | $db = require __DIR__ . '/db.php'; |
3 | 3 | // test database! Important not to run tests on production or development databases |
4 | -$db['dsn'] = 'mysql:host=localhost;dbname=yii2_basic_tests'; |
|
4 | +$db[ 'dsn' ] = 'mysql:host=localhost;dbname=yii2_basic_tests'; |
|
5 | 5 | |
6 | 6 | return $db; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | |
6 | 6 | return [ |
7 | 7 | UploadModelInterface::FILE_TYPE_APP => [ |
8 | - 'existing' => function (Mediafile $mediafile) { |
|
8 | + 'existing' => function(Mediafile $mediafile) { |
|
9 | 9 | return [ |
10 | 10 | 'externalTag' => [ |
11 | 11 | 'name' => 'a', |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | $config = [ |
10 | 10 | 'id' => 'yii2_template_simple_console', |
11 | 11 | 'basePath' => dirname(__DIR__), |
12 | - 'bootstrap' => ['log'], |
|
12 | + 'bootstrap' => [ 'log' ], |
|
13 | 13 | 'controllerNamespace' => 'app\commands', |
14 | 14 | 'aliases' => [ |
15 | 15 | '@bower' => '@vendor/bower-asset', |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | 'targets' => [ |
32 | 32 | [ |
33 | 33 | 'class' => 'yii\log\FileTarget', |
34 | - 'levels' => ['error', 'warning'], |
|
34 | + 'levels' => [ 'error', 'warning' ], |
|
35 | 35 | ], |
36 | 36 | ], |
37 | 37 | ], |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | |
64 | 64 | if (YII_ENV_DEV) { |
65 | 65 | // configuration adjustments for 'dev' environment |
66 | - $config['bootstrap'][] = 'gii'; |
|
67 | - $config['modules']['gii'] = [ |
|
66 | + $config[ 'bootstrap' ][ ] = 'gii'; |
|
67 | + $config[ 'modules' ][ 'gii' ] = [ |
|
68 | 68 | 'class' => 'yii\gii\Module', |
69 | 69 | ]; |
70 | 70 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | 'active' => $controllerId == 'profiles' ? true : false |
44 | 44 | ], |
45 | 45 | ], |
46 | - 'active' => in_array($controllerId, ['roles', 'permissions', 'profiles']) ? true : false |
|
46 | + 'active' => in_array($controllerId, [ 'roles', 'permissions', 'profiles' ]) ? true : false |
|
47 | 47 | ], |
48 | 48 | 'positions' => [ |
49 | 49 | 'title' => Yii::t('positions', 'Positions'), |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | 'active' => $controllerId == 'qualities' ? true : false |
94 | 94 | ], |
95 | 95 | ], |
96 | - 'active' => in_array($controllerId, ['about', 'technologies', 'qualities']) ? true : false |
|
96 | + 'active' => in_array($controllerId, [ 'about', 'technologies', 'qualities' ]) ? true : false |
|
97 | 97 | ], |
98 | 98 | 'contacts' => [ |
99 | 99 | 'title' => Yii::t('contacts', 'Contacts'), |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | 'active' => $controllerId == 'social' ? true : false |
114 | 114 | ], |
115 | 115 | ], |
116 | - 'active' => in_array($controllerId, ['contacts', 'social']) ? true : false |
|
116 | + 'active' => in_array($controllerId, [ 'contacts', 'social' ]) ? true : false |
|
117 | 117 | ], |
118 | 118 | 'home' => [ |
119 | 119 | 'title' => Yii::t('home', 'Home page'), |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | 'active' => $controllerId == 'other-album' ? true : false |
164 | 164 | ], |
165 | 165 | ], |
166 | - 'active' => in_array($controllerId, ['image-album', 'audio-album', 'video-album', 'application-album', 'text-album', 'other-album']) ? true : false |
|
166 | + 'active' => in_array($controllerId, [ 'image-album', 'audio-album', 'video-album', 'application-album', 'text-album', 'other-album' ]) ? true : false |
|
167 | 167 | ], |
168 | 168 | 'sitemap' => [ |
169 | 169 | 'title' => Yii::t('app', 'Sitemap'), |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | 'home' => HomeController::class, |
59 | 59 | 'sitemap' => SitemapController::class |
60 | 60 | ], |
61 | - 'accessRoles' => ['admin', 'manager'], |
|
61 | + 'accessRoles' => [ 'admin', 'manager' ], |
|
62 | 62 | 'components' => [ |
63 | 63 | 'view' => require __DIR__ . '/view-component.php', |
64 | 64 | ], |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | 'permissions' => PermissionController::class, |
72 | 72 | 'profiles' => ProfileController::class |
73 | 73 | ], |
74 | - 'accessRoles' => ['admin', 'manager'], |
|
74 | + 'accessRoles' => [ 'admin', 'manager' ], |
|
75 | 75 | 'components' => [ |
76 | 76 | 'view' => require __DIR__ . '/view-component.php', |
77 | 77 | ], |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | 'text-album' => TextAlbumController::class, |
91 | 91 | 'other-album' => OtherAlbumController::class, |
92 | 92 | ], |
93 | - 'accessRoles' => ['admin', 'manager'], |
|
93 | + 'accessRoles' => [ 'admin', 'manager' ], |
|
94 | 94 | 'defaultStorageType' => MFUModule::STORAGE_TYPE_LOCAL, |
95 | 95 | 'previewOptions' => require __DIR__ . '/../preview-options.php', |
96 | 96 | 'components' => [ |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | 'version' => '1.0.0', |
10 | 10 | 'basePath' => dirname(__DIR__), |
11 | 11 | 'homeUrl' => YII_DEBUG ? 'http://yii2-template-simple' : 'http://yii2-template-simple', |
12 | - 'bootstrap' => ['log'], |
|
12 | + 'bootstrap' => [ 'log' ], |
|
13 | 13 | 'language' => 'en-US', |
14 | 14 | 'aliases' => [ |
15 | 15 | '@bower' => '@vendor/bower-asset', |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | 'targets' => [ |
52 | 52 | [ |
53 | 53 | 'class' => 'yii\log\FileTarget', |
54 | - 'levels' => ['error', 'warning'], |
|
54 | + 'levels' => [ 'error', 'warning' ], |
|
55 | 55 | ], |
56 | 56 | ], |
57 | 57 | ], |
@@ -100,18 +100,18 @@ discard block |
||
100 | 100 | |
101 | 101 | if (YII_ENV_DEV) { |
102 | 102 | // configuration adjustments for 'dev' environment |
103 | - $config['bootstrap'][] = 'debug'; |
|
104 | - $config['modules']['debug'] = [ |
|
103 | + $config[ 'bootstrap' ][ ] = 'debug'; |
|
104 | + $config[ 'modules' ][ 'debug' ] = [ |
|
105 | 105 | 'class' => 'yii\debug\Module', |
106 | 106 | // uncomment the following to add your IP if you are not connecting from localhost. |
107 | - 'allowedIPs' => ['127.0.0.1', '::1', '*'], |
|
107 | + 'allowedIPs' => [ '127.0.0.1', '::1', '*' ], |
|
108 | 108 | ]; |
109 | 109 | |
110 | - $config['bootstrap'][] = 'gii'; |
|
111 | - $config['modules']['gii'] = [ |
|
110 | + $config[ 'bootstrap' ][ ] = 'gii'; |
|
111 | + $config[ 'modules' ][ 'gii' ] = [ |
|
112 | 112 | 'class' => 'yii\gii\Module', |
113 | 113 | // uncomment the following to add your IP if you are not connecting from localhost. |
114 | - 'allowedIPs' => ['127.0.0.1', '::1', '*'], |
|
114 | + 'allowedIPs' => [ '127.0.0.1', '::1', '*' ], |
|
115 | 115 | ]; |
116 | 116 | } |
117 | 117 |