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

@@ -19,16 +19,9 @@ namespace Symfony\Component\HttpFoundation\Session\Attribute;
*/
class NamespacedAttributeBag extends AttributeBag
{
/**
* Namespace character.
*
* @var string
*/
private $namespaceCharacter;
/**
* Constructor.
*
* @param string $storageKey Session storage key
* @param string $namespaceCharacter Namespace character to use in keys
*/
@@ -109,7 +102,7 @@ class NamespacedAttributeBag extends AttributeBag
protected function &resolveAttributePath($name, $writeContext = false)
{
$array = &$this->attributes;
$name = (strpos($name, $this->namespaceCharacter) === 0) ? substr($name, 1) : $name;
$name = (0 === strpos($name, $this->namespaceCharacter)) ? substr($name, 1) : $name;
// Check if there is anything to do, else return
if (!$name) {
@@ -117,7 +110,7 @@ class NamespacedAttributeBag extends AttributeBag
}
$parts = explode($this->namespaceCharacter, $name);
if (count($parts) < 2) {
if (\count($parts) < 2) {
if (!$writeContext) {
return $array;
}
@@ -127,11 +120,17 @@ class NamespacedAttributeBag extends AttributeBag
return $array;
}
unset($parts[count($parts) - 1]);
unset($parts[\count($parts) - 1]);
foreach ($parts as $part) {
if (null !== $array && !array_key_exists($part, $array)) {
$array[$part] = $writeContext ? array() : null;
if (!$writeContext) {
$null = null;
return $null;
}
$array[$part] = array();
}
$array = &$array[$part];