src/Viserio/Component/Translation/Extractor/ChainExtractor.php
public function extract($resource): array
    {
        if (! \is_string($resource) && ! \is_array($resource)) {
            throw new InvalidArgumentException(\sprintf(
                'The resource parameter must be of type string or array, [%s] given.',
                \is_object($resource) ? \get_class($resource) : \gettype($resource)
            ));
        }

        $messages = [];

        foreach ($this->extractors as $extractor) {
            foreach ($extractor->extract($resource) as $key => $foundMessages) {
                $messages[$key] = $foundMessages;
            }
        }

        return $messages;
    }
public function extract($resource): array
    {
        if (! \is_string($resource) && ! \is_array($resource)) {
            throw new InvalidArgumentException(\sprintf(
                'The resource parameter must be of type string or array, [%s] given.',
                \is_object($resource) ? \get_class($resource) : \gettype($resource)
            ));
        }

        $messages = [];

        foreach ($this->extractors as $extractor) {
            foreach ($extractor->extract($resource) as $key => $foundMessages) {
                $messages[$key] = $foundMessages;
            }
        }

        return $messages;
    }
{@inheritdoc}