Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -22,31 +22,23 @@ use Symfony\Component\HttpKernel\KernelInterface;
class FileLocator extends BaseFileLocator
{
private $kernel;
private $path;
/**
* @param KernelInterface $kernel A KernelInterface instance
* @param string|null $path The path the global resource directory
* @param array $paths An array of paths where to look for resources
*/
public function __construct(KernelInterface $kernel, string $path = null, array $paths = [])
public function __construct(KernelInterface $kernel)
{
$this->kernel = $kernel;
if (null !== $path) {
$this->path = $path;
$paths[] = $path;
}
parent::__construct($paths);
parent::__construct();
}
/**
* {@inheritdoc}
*/
public function locate($file, $currentPath = null, $first = true)
public function locate(string $file, string $currentPath = null, bool $first = true)
{
if (isset($file[0]) && '@' === $file[0]) {
return $this->kernel->locateResource($file, $this->path, $first);
$resource = $this->kernel->locateResource($file);
return $first ? $resource : [$resource];
}
return parent::locate($file, $currentPath, $first);