@@ -61,44 +61,44 @@ protected function execute(InputInterface $input, OutputInterface $output)
6161 /** @var KernelInterface $kernel */
6262 $ kernel = $ this ->getApplication ()->getKernel ();
6363
64- $ rows = array (
65- array ( '<info>Symfony</> ' ) ,
64+ $ rows = [
65+ [ '<info>Symfony</> ' ] ,
6666 new TableSeparator (),
67- array ( 'Version ' , Kernel::VERSION ) ,
68- array ( 'End of maintenance ' , Kernel::END_OF_MAINTENANCE .(self ::isExpired (Kernel::END_OF_MAINTENANCE ) ? ' <error>Expired</> ' : '' )) ,
69- array ( 'End of life ' , Kernel::END_OF_LIFE .(self ::isExpired (Kernel::END_OF_LIFE ) ? ' <error>Expired</> ' : '' )) ,
67+ [ 'Version ' , Kernel::VERSION ] ,
68+ [ 'End of maintenance ' , Kernel::END_OF_MAINTENANCE .(self ::isExpired (Kernel::END_OF_MAINTENANCE ) ? ' <error>Expired</> ' : '' )] ,
69+ [ 'End of life ' , Kernel::END_OF_LIFE .(self ::isExpired (Kernel::END_OF_LIFE ) ? ' <error>Expired</> ' : '' )] ,
7070 new TableSeparator (),
71- array ( '<info>Kernel</> ' ) ,
71+ [ '<info>Kernel</> ' ] ,
7272 new TableSeparator (),
73- array ( 'Type ' , \get_class ($ kernel )) ,
74- array ( 'Environment ' , $ kernel ->getEnvironment ()) ,
75- array ( 'Debug ' , $ kernel ->isDebug () ? 'true ' : 'false ' ) ,
76- array ( 'Charset ' , $ kernel ->getCharset ()) ,
77- array ( 'Cache directory ' , self ::formatPath ($ kernel ->getCacheDir (), $ kernel ->getProjectDir ()).' (<comment> ' .self ::formatFileSize ($ kernel ->getCacheDir ()).'</>) ' ) ,
78- array ( 'Log directory ' , self ::formatPath ($ kernel ->getLogDir (), $ kernel ->getProjectDir ()).' (<comment> ' .self ::formatFileSize ($ kernel ->getLogDir ()).'</>) ' ) ,
73+ [ 'Type ' , \get_class ($ kernel )] ,
74+ [ 'Environment ' , $ kernel ->getEnvironment ()] ,
75+ [ 'Debug ' , $ kernel ->isDebug () ? 'true ' : 'false ' ] ,
76+ [ 'Charset ' , $ kernel ->getCharset ()] ,
77+ [ 'Cache directory ' , self ::formatPath ($ kernel ->getCacheDir (), $ kernel ->getProjectDir ()).' (<comment> ' .self ::formatFileSize ($ kernel ->getCacheDir ()).'</>) ' ] ,
78+ [ 'Log directory ' , self ::formatPath ($ kernel ->getLogDir (), $ kernel ->getProjectDir ()).' (<comment> ' .self ::formatFileSize ($ kernel ->getLogDir ()).'</>) ' ] ,
7979 new TableSeparator (),
80- array ( '<info>PHP</> ' ) ,
80+ [ '<info>PHP</> ' ] ,
8181 new TableSeparator (),
82- array ( 'Version ' , PHP_VERSION ) ,
83- array ( 'Architecture ' , (PHP_INT_SIZE * 8 ).' bits ' ) ,
84- array ( 'Intl locale ' , class_exists ('Locale ' , false ) && \Locale::getDefault () ? \Locale::getDefault () : 'n/a ' ) ,
85- array ( 'Timezone ' , date_default_timezone_get ().' (<comment> ' .(new \DateTime ())->format (\DateTime::W3C ).'</>) ' ) ,
86- array ( 'OPcache ' , \extension_loaded ('Zend OPcache ' ) && filter_var (ini_get ('opcache.enable ' ), FILTER_VALIDATE_BOOLEAN ) ? 'true ' : 'false ' ) ,
87- array ( 'APCu ' , \extension_loaded ('apcu ' ) && filter_var (ini_get ('apc.enabled ' ), FILTER_VALIDATE_BOOLEAN ) ? 'true ' : 'false ' ) ,
88- array ( 'Xdebug ' , \extension_loaded ('xdebug ' ) ? 'true ' : 'false ' ) ,
89- ) ;
82+ [ 'Version ' , PHP_VERSION ] ,
83+ [ 'Architecture ' , (PHP_INT_SIZE * 8 ).' bits ' ] ,
84+ [ 'Intl locale ' , class_exists ('Locale ' , false ) && \Locale::getDefault () ? \Locale::getDefault () : 'n/a ' ] ,
85+ [ 'Timezone ' , date_default_timezone_get ().' (<comment> ' .(new \DateTime ())->format (\DateTime::W3C ).'</>) ' ] ,
86+ [ 'OPcache ' , \extension_loaded ('Zend OPcache ' ) && filter_var (ini_get ('opcache.enable ' ), FILTER_VALIDATE_BOOLEAN ) ? 'true ' : 'false ' ] ,
87+ [ 'APCu ' , \extension_loaded ('apcu ' ) && filter_var (ini_get ('apc.enabled ' ), FILTER_VALIDATE_BOOLEAN ) ? 'true ' : 'false ' ] ,
88+ [ 'Xdebug ' , \extension_loaded ('xdebug ' ) ? 'true ' : 'false ' ] ,
89+ ] ;
9090
9191 if ($ dotenv = self ::getDotenvVars ()) {
92- $ rows = array_merge ($ rows , array (
92+ $ rows = array_merge ($ rows , [
9393 new TableSeparator (),
94- array ( '<info>Environment (.env)</> ' ) ,
94+ [ '<info>Environment (.env)</> ' ] ,
9595 new TableSeparator (),
96- ) , array_map (function ($ value , $ name ) {
97- return array ( $ name , $ value) ;
96+ ] , array_map (function ($ value , $ name ) {
97+ return [ $ name , $ value] ;
9898 }, $ dotenv , array_keys ($ dotenv )));
9999 }
100100
101- $ io ->table (array () , $ rows );
101+ $ io ->table ([] , $ rows );
102102 }
103103
104104 private static function formatPath (string $ path , string $ baseDir ): string
@@ -129,7 +129,7 @@ private static function isExpired(string $date): bool
129129
130130 private static function getDotenvVars (): array
131131 {
132- $ vars = array () ;
132+ $ vars = [] ;
133133 foreach (explode (', ' , getenv ('SYMFONY_DOTENV_VARS ' )) as $ name ) {
134134 if ('' !== $ name && false !== $ value = getenv ($ name )) {
135135 $ vars [$ name ] = $ value ;
0 commit comments