<?php declare(strict_types = 1);
interface HelloWorldInterface
{
/**
* @return array{abc: int}|string
*/
public function sayHello();
}
class HelloWorld implements HelloWorldInterface
{
/**
* @inheritDoc
*/
public function sayHello(): array
{
return [
"abc" => 1,
];
}
}
I don't get why it is complaining.
No errors.