The expression return $value; of type array<string,string>|object is incompatible with the return type declared by the interface Marek\Toggable\Hydrator\StrategyInterface::extract of type array as it can also be of type object which is not included in this return type.