Completed
Push — master ( 11b8b0...ca232b )
by Tobias
13:40 queued 14s
created
config/common.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
 $languages = explode(',', getenv('APP_LANGUAGES'));
78 78
 
79 79
 // prepare asset bundle config
80
-$bundles = [];
80
+$bundles = [ ];
81 81
 if (getenv('APP_ASSET_USE_BUNDLED')) {
82 82
     // include generated asset-bundle configuration
83
-    $bundles = include Yii::getAlias('@web/bundles') . '/config.php';
83
+    $bundles = include Yii::getAlias('@web/bundles').'/config.php';
84 84
     // disable loading of bundles skin file, when using bundled assets
85 85
     Yii::$container->set(
86 86
         AdminLteAsset::class,
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
     PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => 0
98 98
 ];
99 99
 if (getenv('MYSQL_ATTR_SSL_CA')) {
100
-    $dbAttributes[PDO::MYSQL_ATTR_SSL_CA] = getenv('MYSQL_ATTR_SSL_CA');
100
+    $dbAttributes[ PDO::MYSQL_ATTR_SSL_CA ] = getenv('MYSQL_ATTR_SSL_CA');
101 101
 }
102 102
 
103 103
 // update Redis increment counter according to queue_manager db (workaround)
104
-Event::on(Queue::class, Queue::EVENT_BEFORE_PUSH, function ($event) {
104
+Event::on(Queue::class, Queue::EVENT_BEFORE_PUSH, function($event) {
105 105
     // added directly to the SQL query, since param binding
106 106
     $table_name = getenv('DATABASE_TABLE_PREFIX').'queue_manager';
107 107
     if (Yii::$app->cache->get('queue_id_synced') !== true) {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 $common = [
143 143
     'id' => 'app',
144 144
     'name' => getenv('APP_TITLE'),
145
-    'language' => $languages[0],
145
+    'language' => $languages[ 0 ],
146 146
     'basePath' => '@app',
147 147
     'vendorPath' => '@root/vendor',
148 148
     'runtimePath' => '@root/runtime',
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     ],
161 161
     'params' => [
162 162
         'adminEmail' => getenv('APP_ADMIN_EMAIL'),
163
-        'context.menuItems' => [],
163
+        'context.menuItems' => [ ],
164 164
         'backend.iframe.name' => getenv('APP_PARAMS_BACKEND_IFRAME_NAME') ?: '_self',
165 165
         'backend.browserSupport' => [
166 166
             'Chrome' => 87,
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     'container' => [
177 177
         'definitions' => [
178 178
             AuthDbManagerComponent::class => [
179
-                'defaultRoles' => ['Default'],
179
+                'defaultRoles' => [ 'Default' ],
180 180
                 'cache' => 'cache'
181 181
             ],
182 182
             AdminController::class => [
@@ -200,12 +200,12 @@  discard block
 block discarded – undo
200 200
                     'rules' => [
201 201
                         [
202 202
                             'allow' => true,
203
-                            'actions' => ['index'],
204
-                            'roles' => ['@'],
203
+                            'actions' => [ 'index' ],
204
+                            'roles' => [ '@' ],
205 205
                         ],
206 206
                         [
207 207
                             'allow' => true,
208
-                            'actions' => ['show'],
208
+                            'actions' => [ 'show' ],
209 209
                             // allow for all logged in users
210 210
                             #'roles' => ['@'],
211 211
                             // allow only if user has 'user' grant or requested his own profile (check by user->id)
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
                                 if (\Yii::$app->user->can('user')) {
217 217
                                     return true;
218 218
                                 }
219
-                                if (\Yii::$app->user->id === (int)Yii::$app->request->getQueryParam('id')) {
219
+                                if (\Yii::$app->user->id === (int) Yii::$app->request->getQueryParam('id')) {
220 220
                                     return true;
221 221
                                 }
222 222
                                 return false;
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
             'converter' => [
238 238
                 'class' => 'yii\web\AssetConverter',
239 239
                 'commands' => [
240
-                    'less' => ['css', 'nodepkg-linuxstatic lessc {from} {to} --no-color --source-map'],
240
+                    'less' => [ 'css', 'nodepkg-linuxstatic lessc {from} {to} --no-color --source-map' ],
241 241
                 ],
242 242
             ],
243 243
         ],
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
                 'common' => [
303 303
                     'class' => Target::class,
304 304
                     'url' => 'php://stderr',
305
-                    'levels' => ['error', 'warning'],
306
-                    'logVars' => [],
305
+                    'levels' => [ 'error', 'warning' ],
306
+                    'logVars' => [ ],
307 307
                     'replaceNewline' => APP_TYPE === 'console' ? null : ''
308 308
                 ]
309 309
             ]
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
             'transport' => [
316 316
                 'scheme' => getenv('APP_MAILER_SCHEME') ?: 'smtp',
317 317
                 'host' => getenv('APP_MAILER_HOST'),
318
-                'port' => (int)getenv('APP_MAILER_PORT'),
318
+                'port' => (int) getenv('APP_MAILER_PORT'),
319 319
                 'encryption' => getenv('APP_MAILER_ENCRYPTION'),
320 320
                 'username' => getenv('APP_MAILER_USERNAME'),
321 321
                 'password' => getenv('APP_MAILER_PASSWORD')
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
                 'charset' => 'UTF-8',
325 325
                 'replyTo' => getenv('APP_MAILER_REPLY_TO'),
326 326
                 'returnPath' => getenv('APP_MAILER_RETURN_PATH'),
327
-                'from' => [getenv('APP_MAILER_FROM') => getenv('APP_TITLE')]
327
+                'from' => [ getenv('APP_MAILER_FROM') => getenv('APP_TITLE') ]
328 328
             ]
329 329
         ],
330 330
         'queue' => [
@@ -351,9 +351,9 @@  discard block
 block discarded – undo
351 351
         'user' => [
352 352
             'class' => User::class,
353 353
             'enableAutoLogin' => true,
354
-            'loginUrl' => ['/user/security/login'],
354
+            'loginUrl' => [ '/user/security/login' ],
355 355
             'identityClass' => UserModel::class,
356
-            'rootUsers' => ['admin']
356
+            'rootUsers' => [ 'admin' ]
357 357
         ],
358 358
         'urlManager' => [
359 359
             'class' => UrlManager::class,
@@ -389,18 +389,18 @@  discard block
 block discarded – undo
389 389
                         'auto_reload' => true
390 390
                     ],
391 391
                     'globals' => [
392
-                        'Html' => ['class' => Html::class],
393
-                        'Json' => ['class' => Json::class],
394
-                        'Tree' => ['class' => Tree::class],
395
-                        'FA' => ['class' => FA::class],
396
-                        'Url' => ['class' => Url::class],
397
-                        'Markdown' => ['class' => Markdown::class]
392
+                        'Html' => [ 'class' => Html::class ],
393
+                        'Json' => [ 'class' => Json::class ],
394
+                        'Tree' => [ 'class' => Tree::class ],
395
+                        'FA' => [ 'class' => FA::class ],
396
+                        'Url' => [ 'class' => Url::class ],
397
+                        'Markdown' => [ 'class' => Markdown::class ]
398 398
                     ],
399 399
                     'functions' => [
400
-                        'image' => function ($imageSource, $preset = '') {
400
+                        'image' => function($imageSource, $preset = '') {
401 401
                             return ImageUrlHelper::image($imageSource, $preset);
402 402
                         },
403
-                        't' => function ($category, $message, $params = [], $language = null) {
403
+                        't' => function($category, $message, $params = [ ], $language = null) {
404 404
                             return Yii::t($category, $message, $params, $language);
405 405
                         }
406 406
                     ],
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
     'modules' => [
415 415
         'audit' => [
416 416
             'class' => AuditModule::class,
417
-            'accessRoles' => ['audit-module'],
417
+            'accessRoles' => [ 'audit-module' ],
418 418
             'layout' => $boxLayout,
419 419
             'panels' => [
420 420
                 'audit/trail' => [
@@ -516,12 +516,12 @@  discard block
 block discarded – undo
516 516
                 [
517 517
                     'connection' => 'db',
518 518
                     'table' => '{{%hrzg_widget_template}}',
519
-                    'columns' => ['twig_template']
519
+                    'columns' => [ 'twig_template' ]
520 520
                 ],
521 521
                 [
522 522
                     'connection' => 'db',
523 523
                     'table' => '{{%twig}}',
524
-                    'columns' => ['value']
524
+                    'columns' => [ 'value' ]
525 525
                 ]
526 526
             ],
527 527
             'scanners' => [
@@ -530,8 +530,8 @@  discard block
 block discarded – undo
530 530
                 ScannerJavaScriptFunction::class,
531 531
                 ScannerDatabase::class
532 532
             ],
533
-            'allowedIPs' => ['*'],
534
-            'roles' => ['translate-module']
533
+            'allowedIPs' => [ '*' ],
534
+            'roles' => [ 'translate-module' ]
535 535
         ],
536 536
         'user' => [
537 537
             'class' => UserModule::class,
@@ -539,12 +539,12 @@  discard block
 block discarded – undo
539 539
             'enableGdprCompliance' => true,
540 540
             'defaultRoute' => 'admin',
541 541
             'administratorPermissionName' => 'user-module',
542
-            'administrators' => ['admin'],
542
+            'administrators' => [ 'admin' ],
543 543
             'enableFlashMessages' => false,
544 544
             'generatePasswords' => true,
545 545
             'enableRegistration' => getenv('APP_USER_ENABLE_REGISTRATION'),
546 546
             'mailParams' => [
547
-                'fromEmail' => [getenv('APP_MAILER_FROM')=>getenv('APP_TITLE')]
547
+                'fromEmail' => [ getenv('APP_MAILER_FROM')=>getenv('APP_TITLE') ]
548 548
             ],
549 549
         ],
550 550
         'widgets' => [
@@ -559,16 +559,16 @@  discard block
 block discarded – undo
559 559
 ];
560 560
 
561 561
 if ($s3Enabled) {
562
-    $common['components']['fsS3'] = [
562
+    $common[ 'components' ][ 'fsS3' ] = [
563 563
         'class' => AwsS3Filesystem::class,
564 564
         'key' => getenv('AMAZON_S3_BUCKET_PUBLIC_KEY'),
565 565
         'secret' => getenv('AMAZON_S3_BUCKET_SECRET_KEY'),
566 566
         'bucket' => getenv('AMAZON_S3_BUCKET_NAME'),
567
-        'prefix' => getenv('APP_NAME') . '/public',
567
+        'prefix' => getenv('APP_NAME').'/public',
568 568
         'region' => getenv('AMAZON_S3_BUCKET_REGION')
569 569
     ];
570 570
 
571
-    $common['modules']['filefly']['filesystemComponents']['s3'] = 'fsS3';
571
+    $common[ 'modules' ][ 'filefly' ][ 'filesystemComponents' ][ 's3' ] = 'fsS3';
572 572
 }
573 573
 
574 574
 return $common;
Please login to merge, or discard this patch.