Laravel version update
Laravel version update
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
|
||||
namespace Symfony\Component\Translation\Extractor;
|
||||
|
||||
use Symfony\Component\Translation\Exception\InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* Base class used by classes that extract translation messages from files.
|
||||
*
|
||||
@@ -19,13 +21,13 @@ namespace Symfony\Component\Translation\Extractor;
|
||||
abstract class AbstractFileExtractor
|
||||
{
|
||||
/**
|
||||
* @param string|array $resource files, a file or a directory
|
||||
* @param string|array $resource Files, a file or a directory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function extractFiles($resource)
|
||||
{
|
||||
if (is_array($resource) || $resource instanceof \Traversable) {
|
||||
if (\is_array($resource) || $resource instanceof \Traversable) {
|
||||
$files = array();
|
||||
foreach ($resource as $file) {
|
||||
if ($this->canBeExtracted($file)) {
|
||||
@@ -41,14 +43,9 @@ abstract class AbstractFileExtractor
|
||||
return $files;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $file
|
||||
*
|
||||
* @return \SplFileInfo
|
||||
*/
|
||||
private function toSplFileInfo($file)
|
||||
private function toSplFileInfo(string $file): \SplFileInfo
|
||||
{
|
||||
return ($file instanceof \SplFileInfo) ? $file : new \SplFileInfo($file);
|
||||
return new \SplFileInfo($file);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,12 +53,12 @@ abstract class AbstractFileExtractor
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
protected function isFile($file)
|
||||
{
|
||||
if (!is_file($file)) {
|
||||
throw new \InvalidArgumentException(sprintf('The "%s" file does not exist.', $file));
|
||||
throw new InvalidArgumentException(sprintf('The "%s" file does not exist.', $file));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -75,7 +72,7 @@ abstract class AbstractFileExtractor
|
||||
abstract protected function canBeExtracted($file);
|
||||
|
||||
/**
|
||||
* @param string|array $resource files, a file or a directory
|
||||
* @param string|array $resource Files, a file or a directory
|
||||
*
|
||||
* @return array files to be extracted
|
||||
*/
|
||||
|
Reference in New Issue
Block a user