File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ class NewCommand extends Command
3030 public $ relativePath ;
3131 public $ absolutePath ;
3232 public $ name ;
33+ public $ version ;
3334 public $ starterKit ;
3435 public $ starterKitVcs ;
3536 public $ starterKitLicense ;
@@ -160,6 +161,10 @@ protected function processArguments()
160161
161162 $ this ->name = pathinfo ($ this ->absolutePath )['basename ' ];
162163
164+ $ this ->version = $ this ->input ->getOption ('dev ' )
165+ ? 'dev-master '
166+ : '' ;
167+
163168 $ this ->starterKit = $ this ->input ->getArgument ('starter-kit ' );
164169 $ this ->starterKitLicense = $ this ->input ->getOption ('license ' );
165170 $ this ->local = $ this ->input ->getOption ('local ' );
@@ -721,11 +726,9 @@ protected function createProjectCommand()
721726
722727 $ baseRepo = self ::BASE_REPO ;
723728
724- $ version = $ this ->getVersion ();
725-
726729 $ directory = $ this ->pathIsCwd () ? '. ' : $ this ->relativePath ;
727730
728- return $ composer ." create-project {$ baseRepo } \"{$ directory }\" {$ version } --remove-vcs --prefer-dist " ;
731+ return $ composer ." create-project {$ baseRepo } \"{$ directory }\" {$ this -> version } --remove-vcs --prefer-dist " ;
729732 }
730733
731734 /**
@@ -842,13 +845,4 @@ public function __call($method, $args)
842845 }
843846 };
844847 }
845-
846- protected function getVersion ()
847- {
848- if ($ this ->input ->getOption ('dev ' )) {
849- return 'dev-master ' ;
850- }
851-
852- return '' ;
853- }
854848}
You can’t perform that action at this time.
0 commit comments