[HttpFoundation][NamespacedAttributeBag] Refactoring of resolveKey() method
This commit is contained in:
parent
31138f4474
commit
a644516c5c
@ -149,8 +149,8 @@ class NamespacedAttributeBag extends AttributeBag
|
||||
*/
|
||||
protected function resolveKey($name)
|
||||
{
|
||||
if (strpos($name, $this->namespaceCharacter) !== false) {
|
||||
$name = substr($name, strrpos($name, $this->namespaceCharacter)+1, strlen($name));
|
||||
if (false !== $pos = strrpos($name, $this->namespaceCharacter)) {
|
||||
$name = substr($name, $pos+1);
|
||||
}
|
||||
|
||||
return $name;
|
||||
|
Reference in New Issue
Block a user