1 | <?php |
||
14 | final class DefaultDateFormatter implements DateFormatter |
||
15 | { |
||
16 | /** |
||
17 | * @var \eZ\Publish\Core\MVC\Symfony\Locale\LocaleConverterInterface |
||
18 | */ |
||
19 | private $localeConverter; |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | private $languages; |
||
25 | |||
26 | /** |
||
27 | * @var \eZ\Publish\Core\MVC\ConfigResolverInterface |
||
28 | */ |
||
29 | private $configResolver; |
||
30 | |||
31 | /** |
||
32 | * DefaultDateFormatter constructor. |
||
33 | * |
||
34 | * @param \eZ\Publish\Core\MVC\Symfony\Locale\LocaleConverterInterface $localeConverter |
||
35 | * @param \eZ\Publish\Core\MVC\ConfigResolverInterface $configResolver |
||
36 | * @param array $languages |
||
37 | */ |
||
38 | public function __construct(LocaleConverterInterface $localeConverter, ConfigResolverInterface $configResolver, array $languages) |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function format(DateTimeInterface $date, string $dateFormatIdentifier): string |
||
86 | } |
||
87 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: