@@ -33,9 +33,9 @@ class Admin
3333 *
3434 * @return Repository
3535 */
36- public static function init ($ path , $ bare = true , array $ options = array () )
36+ public static function init ($ path , $ bare = true , array $ options = [] )
3737 {
38- $ process = static ::getProcess ('init ' , array_merge (array ( '-q ' ) , $ bare ? array ( '--bare ' ) : array (), array ( $ path) ), $ options );
38+ $ process = static ::getProcess ('init ' , array_merge ([ '-q ' ] , $ bare ? [ '--bare ' ] : [], [ $ path] ), $ options );
3939
4040 $ process ->run ();
4141
@@ -58,9 +58,9 @@ public static function init($path, $bare = true, array $options = array())
5858 *
5959 * @return bool true if url is valid
6060 */
61- public static function isValidRepository ($ url , array $ options = array () )
61+ public static function isValidRepository ($ url , array $ options = [] )
6262 {
63- $ process = static ::getProcess ('ls-remote ' , array ( $ url) , $ options );
63+ $ process = static ::getProcess ('ls-remote ' , [ $ url] , $ options );
6464
6565 $ process ->run ();
6666
@@ -77,9 +77,9 @@ public static function isValidRepository($url, array $options = array())
7777 *
7878 * @return Repository
7979 */
80- public static function cloneTo ($ path , $ url , $ bare = true , array $ options = array () )
80+ public static function cloneTo ($ path , $ url , $ bare = true , array $ options = [] )
8181 {
82- $ args = $ bare ? array ( '--bare ' ) : array () ;
82+ $ args = $ bare ? [ '--bare ' ] : [] ;
8383
8484 return static ::cloneRepository ($ path , $ url , $ args , $ options );
8585 }
@@ -95,9 +95,9 @@ public static function cloneTo($path, $url, $bare = true, array $options = array
9595 *
9696 * @return Repository
9797 */
98- public static function cloneBranchTo ($ path , $ url , $ branch , $ bare = true , $ options = array () )
98+ public static function cloneBranchTo ($ path , $ url , $ branch , $ bare = true , $ options = [] )
9999 {
100- $ args = array ( '--branch ' , $ branch) ;
100+ $ args = [ '--branch ' , $ branch] ;
101101 if ($ bare ) {
102102 $ args [] = '--bare ' ;
103103 }
@@ -114,9 +114,9 @@ public static function cloneBranchTo($path, $url, $branch, $bare = true, $option
114114 *
115115 * @return Repository
116116 */
117- public static function mirrorTo ($ path , $ url , array $ options = array () )
117+ public static function mirrorTo ($ path , $ url , array $ options = [] )
118118 {
119- return static ::cloneRepository ($ path , $ url , array ( '--mirror ' ) , $ options );
119+ return static ::cloneRepository ($ path , $ url , [ '--mirror ' ] , $ options );
120120 }
121121
122122 /**
@@ -129,9 +129,9 @@ public static function mirrorTo($path, $url, array $options = array())
129129 *
130130 * @return Repository
131131 */
132- public static function cloneRepository ($ path , $ url , array $ args = array () , array $ options = array () )
132+ public static function cloneRepository ($ path , $ url , array $ args = [] , array $ options = [] )
133133 {
134- $ process = static ::getProcess ('clone ' , array_merge (array ( '-q ' ) , $ args , array ( $ url , $ path) ), $ options );
134+ $ process = static ::getProcess ('clone ' , array_merge ([ '-q ' ] , $ args , [ $ url , $ path] ), $ options );
135135
136136 $ process ->run ();
137137
@@ -145,16 +145,16 @@ public static function cloneRepository($path, $url, array $args = array(), array
145145 /**
146146 * This internal method is used to create a process object.
147147 */
148- private static function getProcess ($ command , array $ args = array () , array $ options = array () )
148+ private static function getProcess ($ command , array $ args = [] , array $ options = [] )
149149 {
150150 $ is_windows = defined ('PHP_WINDOWS_VERSION_BUILD ' );
151- $ options = array_merge (array (
152- 'environment_variables ' => $ is_windows ? array ( 'PATH ' => getenv ('PATH ' )) : array () ,
151+ $ options = array_merge ([
152+ 'environment_variables ' => $ is_windows ? [ 'PATH ' => getenv ('PATH ' )] : [] ,
153153 'command ' => 'git ' ,
154154 'process_timeout ' => 3600 ,
155- ) , $ options );
155+ ] , $ options );
156156
157- $ commandline = array_merge (array ( $ options ['command ' ], $ command) , $ args );
157+ $ commandline = array_merge ([ $ options ['command ' ], $ command] , $ args );
158158
159159 // Backward compatible layer for Symfony Process < 4.0.
160160 if (class_exists ('Symfony\Component\Process\ProcessBuilder ' )) {
0 commit comments