It seems like argument() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
14
if ($locales = $this->/** @scrutinizer ignore-call */ argument('locales')) {
Loading history...
15
return Arr::wrap($locales);
16
}
17
18
$locales = $this->confirm("Do you want to $method all localizations?") ? $this->getAllLocales() : $this->selectLocales();
It seems like confirm() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
18
$locales = $this->/** @scrutinizer ignore-call */ confirm("Do you want to $method all localizations?") ? $this->getAllLocales() : $this->selectLocales();
Loading history...
19
20
return Arr::wrap($locales);
21
}
22
23
protected function getAllLocales(): array
24
{
25
return Locales::available();
26
}
27
28
protected function selectLocales()
29
{
30
return $this->choice('What languages to add? (specify the necessary localizations separated by commas)', $this->getAllLocales(), null, null, true);
It seems like choice() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
30
return $this->/** @scrutinizer ignore-call */ choice('What languages to add? (specify the necessary localizations separated by commas)', $this->getAllLocales(), null, null, true);