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

@@ -28,11 +28,11 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader
* @param string $path A directory path
* @param string|null $type The resource type
*
* @return RouteCollection A RouteCollection instance
* @return RouteCollection
*
* @throws \InvalidArgumentException When the directory does not exist or its routes cannot be parsed
*/
public function load($path, $type = null)
public function load($path, string $type = null)
{
if (!is_dir($dir = $this->locator->locate($path))) {
return parent::supports($path, $type) ? parent::load($path, $type) : new RouteCollection();
@@ -54,7 +54,7 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader
});
foreach ($files as $file) {
if (!$file->isFile() || '.php' !== substr($file->getFilename(), -4)) {
if (!$file->isFile() || !str_ends_with($file->getFilename(), '.php')) {
continue;
}
@@ -74,7 +74,7 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader
/**
* {@inheritdoc}
*/
public function supports($resource, $type = null)
public function supports($resource, string $type = null)
{
if ('annotation' === $type) {
return true;