File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,12 @@ require_once __DIR__ . '/../vendor/autoload_runtime.php';
14
14
15
15
return static function (Command $ command ) {
16
16
$ command ->addArgument ('recipeName ' , InputArgument::REQUIRED );
17
+ $ command ->addArgument ('paths ' , InputArgument::REQUIRED | InputArgument::IS_ARRAY );
17
18
18
19
$ command ->setCode (function (InputInterface $ input , OutputInterface $ output ) {
19
- $ recipe = Recipe::tryFrom ($ input ->getArgument ('recipeName ' ));
20
+ $ recipeNameArgumentValue = $ input ->getArgument ('recipeName ' );
21
+ assert (is_string ($ recipeNameArgumentValue ));
22
+ $ recipe = Recipe::tryFrom ($ recipeNameArgumentValue );
20
23
21
24
if ($ recipe === null ) {
22
25
$ output ->writeln ('<error>Invalid recipe name provided, allowed recipes are:</error> ' );
@@ -33,7 +36,10 @@ return static function (Command $command) {
33
36
34
37
$ applicationDirectory = (string ) getcwd ();
35
38
36
- $ runRecipe ->run ($ recipe ->value , $ applicationDirectory , ['src ' ]);
39
+ $ pathsArgumentValue = $ input ->getArgument ('paths ' );
40
+ assert (is_array ($ pathsArgumentValue ) && count ($ pathsArgumentValue ) > 0 );
41
+
42
+ $ runRecipe ->run ($ recipe ->value , $ applicationDirectory , $ pathsArgumentValue );
37
43
});
38
44
39
45
return $ command ;
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ parameters:
6
6
level : max
7
7
paths :
8
8
- src
9
- - bin
10
9
- tests
10
+ - bin/run-recipe
11
11
checkUninitializedProperties : true
12
12
excludePaths :
13
13
- tests/ExampleApplication/
You can’t perform that action at this time.
0 commit comments