Преглед на файлове

Convert to short syntax

sensorario преди 12 години
родител
ревизия
b0fcdfab1a
променени са 4 файла, в които са добавени 42 реда и са изтрити 42 реда
  1. 6 6
      config/AppAsset.php
  2. 15 15
      config/console.php
  3. 2 2
      config/params.php
  4. 19 19
      config/web.php

+ 6 - 6
config/AppAsset.php

@@ -17,13 +17,13 @@ class AppAsset extends AssetBundle
 {
 	public $basePath = '@webroot';
 	public $baseUrl = '@web';
-	public $css = array(
+	public $css = [
 		'css/site.css',
-	);
-	public $js = array(
-	);
-	public $depends = array(
+	];
+	public $js = [
+	];
+	public $depends = [
 		'yii\web\YiiAsset',
 		'yii\bootstrap\BootstrapAsset',
-	);
+	];
 }

+ 15 - 15
config/console.php

@@ -1,25 +1,25 @@
 <?php
 $params = require(__DIR__ . '/params.php');
-return array(
+return [
 	'id' => 'bootstrap-console',
 	'basePath' => dirname(__DIR__),
 	'preload' => array('log'),
 	'controllerPath' => dirname(__DIR__) . '/commands',
 	'controllerNamespace' => 'app\commands',
-	'modules' => array(
-	),
-	'components' => array(
-		'cache' => array(
+	'modules' => [
+	],
+	'components' => [
+		'cache' => [
 			'class' => 'yii\caching\FileCache',
-		),
-		'log' => array(
-			'targets' => array(
-				array(
+		],
+		'log' => [
+			'targets' => [
+				[
 					'class' => 'yii\log\FileTarget',
-					'levels' => array('error', 'warning'),
-				),
-			),
-		),
-	),
+					'levels' => ['error', 'warning'],
+				],
+			],
+		],
+	],
 	'params' => $params,
-);
+];

+ 2 - 2
config/params.php

@@ -1,5 +1,5 @@
 <?php
 
-return array(
+return [
 	'adminEmail' => 'admin@example.com',
-);
+];

+ 19 - 19
config/web.php

@@ -1,33 +1,33 @@
 <?php
 $params = require(__DIR__ . '/params.php');
-$config = array(
+$config = [
 	'id' => 'bootstrap',
 	'basePath' => dirname(__DIR__),
-	'components' => array(
-		'request' => array(
+	'components' => [
+		'request' => [
 			'enableCsrfValidation' => true,
-		),
-		'cache' => array(
+		],
+		'cache' => [
 			'class' => 'yii\caching\FileCache',
-		),
-		'user' => array(
+		],
+		'user' => [
 			'identityClass' => 'app\models\User',
-		),
-		'errorHandler' => array(
+		],
+		'errorHandler' => [
 			'errorAction' => 'site/error',
-		),
-		'log' => array(
+		],
+		'log' => [
 			'traceLevel' => YII_DEBUG ? 3 : 0,
-			'targets' => array(
-				array(
+			'targets' => [
+				[
 					'class' => 'yii\log\FileTarget',
-					'levels' => array('error', 'warning'),
-				),
-			),
-		),
-	),
+					'levels' => ['error', 'warning'],
+				],
+			],
+		],
+	],
 	'params' => $params,
-);
+];
 
 if (YII_ENV_DEV) {
 	$config['preload'][] = 'debug';