Nelmio\Alice\Definition\Value\FunctionCallValue::getArguments PHP Method

getArguments() public method

public getArguments ( ) : array
return array
    public function getArguments() : array
    {
        return deep_clone($this->arguments);
    }

Usage Example

Ejemplo n.º 1
0
 public function testIsImmutable()
 {
     $arguments = [$arg0 = new \stdClass()];
     $value = new FunctionCallValue('setUsername', $arguments);
     // Mutate injected value
     $arg0->foo = 'bar';
     // Mutate returned value
     $value->getArguments()[0]->foo = 'baz';
     $this->assertEquals([new \stdClass()], $value->getArguments());
     $this->assertEquals(['setUsername', [new \stdClass()]], $value->getValue());
 }
All Usage Examples Of Nelmio\Alice\Definition\Value\FunctionCallValue::getArguments