package and depencies
This commit is contained in:
@@ -20,12 +20,7 @@ use Symfony\Component\Translation\Exception\InvalidArgumentException;
|
||||
*/
|
||||
abstract class AbstractFileExtractor
|
||||
{
|
||||
/**
|
||||
* @param string|iterable $resource Files, a file or a directory
|
||||
*
|
||||
* @return iterable
|
||||
*/
|
||||
protected function extractFiles($resource)
|
||||
protected function extractFiles(string|iterable $resource): iterable
|
||||
{
|
||||
if (is_iterable($resource)) {
|
||||
$files = [];
|
||||
@@ -49,11 +44,9 @@ abstract class AbstractFileExtractor
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
protected function isFile(string $file)
|
||||
protected function isFile(string $file): bool
|
||||
{
|
||||
if (!is_file($file)) {
|
||||
throw new InvalidArgumentException(sprintf('The "%s" file does not exist.', $file));
|
||||
@@ -68,9 +61,7 @@ abstract class AbstractFileExtractor
|
||||
abstract protected function canBeExtracted(string $file);
|
||||
|
||||
/**
|
||||
* @param string|array $resource Files, a file or a directory
|
||||
*
|
||||
* @return iterable
|
||||
*/
|
||||
abstract protected function extractFromDirectory($resource);
|
||||
abstract protected function extractFromDirectory(string|array $resource);
|
||||
}
|
||||
|
Reference in New Issue
Block a user