@@ -84,7 +84,7 @@ public function bake(string $controllerName, Arguments $args, ConsoleIo $io): vo
8484 $ actions = ['index ' , 'view ' , 'add ' , 'edit ' , 'delete ' ];
8585 }
8686 if ($ args ->getOption ('actions ' )) {
87- $ actions = array_map ('trim ' , explode (', ' , $ args ->getOption ('actions ' )));
87+ $ actions = array_map ('trim ' , explode (', ' , ( string ) $ args ->getOption ('actions ' )));
8888 $ actions = array_filter ($ actions );
8989 }
9090 if (!$ args ->getOption ('actions ' ) && Plugin::isLoaded ('Authentication ' ) && $ controllerName === 'Users ' ) {
@@ -221,7 +221,7 @@ public function getComponents(Arguments $args): array
221221 {
222222 $ components = [];
223223 if ($ args ->getOption ('components ' )) {
224- $ components = explode (', ' , $ args ->getOption ('components ' ));
224+ $ components = explode (', ' , ( string ) $ args ->getOption ('components ' ));
225225 $ components = array_values (array_filter (array_map ('trim ' , $ components )));
226226 } else {
227227 if (Plugin::isLoaded ('Authorization ' )) {
@@ -242,7 +242,7 @@ public function getHelpers(Arguments $args): array
242242 {
243243 $ helpers = [];
244244 if ($ args ->getOption ('helpers ' )) {
245- $ helpers = explode (', ' , $ args ->getOption ('helpers ' ));
245+ $ helpers = explode (', ' , ( string ) $ args ->getOption ('helpers ' ));
246246 $ helpers = array_values (array_filter (array_map ('trim ' , $ helpers )));
247247 }
248248
0 commit comments