updated-packages

This commit is contained in:
RafficMohammed
2023-01-08 00:13:22 +05:30
parent 3ff7df7487
commit da241bacb6
12659 changed files with 563377 additions and 510538 deletions

View File

@@ -21,21 +21,21 @@ use Symfony\Component\Translation\Exception\InvalidArgumentException;
abstract class AbstractFileExtractor
{
/**
* @param string|array $resource Files, a file or a directory
* @param string|iterable $resource Files, a file or a directory
*
* @return array
* @return iterable
*/
protected function extractFiles($resource)
{
if (\is_array($resource) || $resource instanceof \Traversable) {
$files = array();
if (is_iterable($resource)) {
$files = [];
foreach ($resource as $file) {
if ($this->canBeExtracted($file)) {
$files[] = $this->toSplFileInfo($file);
}
}
} elseif (is_file($resource)) {
$files = $this->canBeExtracted($resource) ? array($this->toSplFileInfo($resource)) : array();
$files = $this->canBeExtracted($resource) ? [$this->toSplFileInfo($resource)] : [];
} else {
$files = $this->extractFromDirectory($resource);
}
@@ -74,7 +74,7 @@ abstract class AbstractFileExtractor
/**
* @param string|array $resource Files, a file or a directory
*
* @return array files to be extracted
* @return iterable files to be extracted
*/
abstract protected function extractFromDirectory($resource);
}