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

@@ -1,10 +1,8 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @see https://github.com/zendframework/zend-loader for the canonical source repository
* @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (https://www.zend.com)
* @license https://github.com/zendframework/zend-loader/blob/master/LICENSE.md New BSD License
*/
namespace Zend\Loader;
@@ -25,13 +23,13 @@ class ClassMapAutoloader implements SplAutoloader
* Registry of map files that have already been loaded
* @var array
*/
protected $mapsLoaded = array();
protected $mapsLoaded = [];
/**
* Class name/filename map
* @var array
*/
protected $map = array();
protected $map = [];
/**
* Constructor
@@ -83,7 +81,7 @@ class ClassMapAutoloader implements SplAutoloader
}
}
if (!is_array($map)) {
if (! is_array($map)) {
require_once __DIR__ . '/Exception/InvalidArgumentException.php';
throw new Exception\InvalidArgumentException(sprintf(
'Map file provided does not return a map. Map file: "%s"',
@@ -109,7 +107,7 @@ class ClassMapAutoloader implements SplAutoloader
*/
public function registerAutoloadMaps($locations)
{
if (!is_array($locations) && !($locations instanceof Traversable)) {
if (! is_array($locations) && ! ($locations instanceof Traversable)) {
require_once __DIR__ . '/Exception/InvalidArgumentException.php';
throw new Exception\InvalidArgumentException('Map list must be an array or implement Traversable');
}
@@ -150,7 +148,7 @@ class ClassMapAutoloader implements SplAutoloader
*/
public function register()
{
spl_autoload_register(array($this, 'autoload'), true, true);
spl_autoload_register([$this, 'autoload'], true, true);
}
/**
@@ -166,7 +164,7 @@ class ClassMapAutoloader implements SplAutoloader
*/
protected function loadMapFromFile($location)
{
if (!file_exists($location)) {
if (! file_exists($location)) {
require_once __DIR__ . '/Exception/InvalidArgumentException.php';
throw new Exception\InvalidArgumentException(sprintf(
'Map file provided does not exist. Map file: "%s"',
@@ -174,7 +172,7 @@ class ClassMapAutoloader implements SplAutoloader
));
}
if (!$path = static::realPharPath($location)) {
if (! $path = static::realPharPath($location)) {
$path = realpath($location);
}
@@ -197,19 +195,19 @@ class ClassMapAutoloader implements SplAutoloader
*/
public static function realPharPath($path)
{
if (!preg_match('|^phar:(/{2,3})|', $path, $match)) {
if (! preg_match('|^phar:(/{2,3})|', $path, $match)) {
return;
}
$prefixLength = 5 + strlen($match[1]);
$parts = explode('/', str_replace(array('/', '\\'), '/', substr($path, $prefixLength)));
$parts = explode('/', str_replace(['/', '\\'], '/', substr($path, $prefixLength)));
$parts = array_values(array_filter($parts, function ($p) {
return ($p !== '' && $p !== '.');
}));
array_walk($parts, function ($value, $key) use (&$parts) {
if ($value === '..') {
unset($parts[$key], $parts[$key-1]);
unset($parts[$key], $parts[$key - 1]);
$parts = array_values($parts);
}
});