@@ -63,15 +63,15 @@ public static function defaultName(): string
6363 public function execute (Arguments $ args , ConsoleIo $ io ): ?int
6464 {
6565 $ plugin = '' ;
66- if ($ args ->getOption ('exclude ' )) {
66+ if ($ args ->hasOption ('exclude ' )) {
6767 $ this ->_exclude = explode (', ' , (string )$ args ->getOption ('exclude ' ));
6868 }
69- if ($ args ->getOption ('files ' )) {
69+ if ($ args ->hasOption ('files ' )) {
7070 $ this ->_files = explode (', ' , (string )$ args ->getOption ('files ' ));
7171 }
72- if ($ args ->getOption ('paths ' )) {
72+ if ($ args ->hasOption ('paths ' )) {
7373 $ this ->_paths = explode (', ' , (string )$ args ->getOption ('paths ' ));
74- } elseif ($ args ->getOption ('plugin ' )) {
74+ } elseif ($ args ->hasOption ('plugin ' )) {
7575 $ plugin = Inflector::camelize ((string )$ args ->getOption ('plugin ' ));
7676 $ this ->_paths = [Plugin::classPath ($ plugin ), Plugin::templatePath ($ plugin )];
7777 } else {
@@ -90,6 +90,10 @@ public function execute(Arguments $args, ConsoleIo $io): ?int
9090 }
9191
9292 if ($ args ->hasOption ('exclude-plugins ' ) && $ this ->_isExtractingApp ()) {
93+ /**
94+ * @phpstan-ignore-next-line
95+ * @psalm-suppress PropertyTypeCoercion
96+ */
9397 $ this ->_exclude = array_merge ($ this ->_exclude , App::path ('plugins ' ));
9498 }
9599
@@ -206,7 +210,7 @@ protected function _saveMessages(Arguments $args, ConsoleIo $io): void
206210 });
207211
208212 $ domains = null ;
209- if ($ args ->getOption ('domains ' )) {
213+ if ($ args ->hasOption ('domains ' )) {
210214 $ domains = explode (', ' , (string )$ args ->getOption ('domains ' ));
211215 }
212216
@@ -222,7 +226,7 @@ protected function _saveMessages(Arguments $args, ConsoleIo $io): void
222226 foreach ($ translations as $ msgid => $ contexts ) {
223227 foreach ($ contexts as $ context => $ details ) {
224228 $ references = null ;
225- if (!$ args ->getOption ('no-location ' )) {
229+ if (!( bool ) $ args ->getOption ('no-location ' )) {
226230 $ files = $ details ['references ' ];
227231 $ occurrences = [];
228232 foreach ($ files as $ file => $ lines ) {
0 commit comments