Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -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
*/