It seems like $this->getData('created') can also be of type array; however, parameter $time of DateTimeImmutable::__construct() does only seem to accept string, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
37
return new \DateTimeImmutable(/** @scrutinizer ignore-type */ $this->getData('created'), 'Europe/Moscow');
'Europe/Moscow' of type string is incompatible with the type DateTimeZone expected by parameter $timezone of DateTimeImmutable::__construct().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
37
return new \DateTimeImmutable($this->getData('created'), /** @scrutinizer ignore-type */ 'Europe/Moscow');
array() of type array is incompatible with the type null|string expected by parameter $default of Osnova\Services\ServiceEntity::getData().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation