The method environment() does not exist on Illuminate\Container\Container. Are you sure you never get this type here, but always one of the subclasses?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
15
if (app()->/** @scrutinizer ignore-call */ environment() != 'local') {
Loading history...
16
throw new \Exception('Aborting. This command is dangerous and only meant for your local environment.');
17
}
18
19
if ($this->option('reset')) {
20
if (! $this->confirm('You are about to force reset the database in the ' . app()->environment() . ' environment! ARE YOU SURE?')) {
21
$this->info('aborting.');
22
23
return;
24
}
25
}
26
27
// loop over all managed models
28
29
// reset entries if requested
30
31
// Add 10 dummy entries + make sure to enter page fragments as well.