@@ -94,8 +94,8 @@ static function __static() {
9494 */
9595 protected static function textOf ($ markup ) {
9696 return strip_tags (preg_replace (
97- array ( '#<pre># ' , '#</pre># ' , '#<li># ' ) ,
98- array ( self ::$ line , self ::$ line , '* ' ) ,
97+ [ '#<pre># ' , '#</pre># ' , '#<li># ' ] ,
98+ [ self ::$ line , self ::$ line , '* ' ] ,
9999 trim ($ markup )
100100 ));
101101 }
@@ -106,9 +106,9 @@ protected static function textOf($markup) {
106106 */
107107 protected static function showUsage () {
108108 $ class = new \lang \XPClass (__CLASS__ );
109- Console::$ err ->writeLine (strtr (self ::textOf ($ class ->getComment ()), array (
109+ Console::$ err ->writeLine (strtr (self ::textOf ($ class ->getComment ()), [
110110 '{{VERSION}} ' => $ class ->getClassLoader ()->getResource ('VERSION ' )
111- ) ));
111+ ] ));
112112
113113 // List supported syntaxes
114114 Console::$ err ->writeLine (self ::$ line );
@@ -135,7 +135,7 @@ protected static function fromFolder($uri, $recursive) {
135135 }
136136 }
137137
138- $ files = array () ;
138+ $ files = [] ;
139139 $ it = new FilteredIOCollectionIterator (new FileCollection ($ uri ), $ filter , $ recursive );
140140 foreach ($ it as $ element ) {
141141 $ files []= new FileSource (new File ($ element ->getURI ()));
@@ -150,7 +150,7 @@ protected static function fromFolder($uri, $recursive) {
150150 * @return xp.compiler.io.FileManager
151151 */
152152 protected static function declaringFileManager () {
153- return newinstance ('xp.compiler.io.FileManager ' , array () , '{
153+ return newinstance ('xp.compiler.io.FileManager ' , [] , '{
154154 public $declared= array();
155155 public function write($r, \io\File $target) {
156156 $r->executeWith(array());
@@ -183,7 +183,7 @@ public static function main(array $args) {
183183 $ profiles = ['default ' ];
184184 $ emitter = 'php5.5 ' ;
185185 $ result = function ($ success ) { return $ success ? 0 : 1 ; };
186- $ files = array () ;
186+ $ files = [] ;
187187 $ listener = new DefaultDiagnosticListener (Console::$ out );
188188 for ($ i = 0 , $ s = sizeof ($ args ); $ i < $ s ; $ i ++) {
189189 if ('-? ' == $ args [$ i ] || '--help ' == $ args [$ i ]) {
@@ -222,7 +222,7 @@ public static function main(array $args) {
222222 $ manager = self ::declaringFileManager ();
223223 $ result = function ($ success , $ argv ) use ($ manager ) {
224224 if (!$ success ) return 1 ;
225- return (int )$ manager ->declared [0 ]->getMethod ('main ' )->invoke (null , array ( $ argv) );
225+ return (int )$ manager ->declared [0 ]->getMethod ('main ' )->invoke (null , [ $ argv] );
226226 };
227227 break ;
228228 } else if ('-w ' == $ args [$ i ]) {
@@ -231,7 +231,7 @@ public static function main(array $args) {
231231 $ manager = self ::declaringFileManager ();
232232 $ result = function ($ success , $ argv ) use ($ manager ) {
233233 if (!$ success ) return 1 ;
234- Console::writeLine ($ manager ->declared [0 ]->getMethod ('main ' )->invoke (null , array ( $ argv) ));
234+ Console::writeLine ($ manager ->declared [0 ]->getMethod ('main ' )->invoke (null , [ $ argv] ));
235235 return 0 ;
236236 };
237237 break ;
0 commit comments