public static function fromNative()
    {
        $args = func_get_args();

        if (count($args) != 2) {
            throw new \BadMethodCallException('This methods expects two arguments. One for the key and one for the value.');
        }

        $keyString   = \strval($args[0]);
        $valueString = \strval($args[1]);
        $key   = new StringLiteral($keyString);
        $value = new StringLiteral($valueString);

        return new self($key, $value);
    }
public static function fromNative()
    {
        $args = func_get_args();

        if (count($args) != 2) {
            throw new \BadMethodCallException('This methods expects two arguments. One for the key and one for the value.');
        }

        $keyString   = \strval($args[0]);
        $valueString = \strval($args[1]);
        $key   = new StringLiteral($keyString);
        $value = new StringLiteral($valueString);

        return new self($key, $value);
    }
public static function fromNative ( ) { $ args = func_get_args ( ) ; if ( count ( $ args ) != 2 ) { throw new \ BadMethodCallException ( 'This methods expects two arguments. One for the key and one for the value.' ) ; } $ keyString = \ strval ( $ args [ 0 ] ) ; $ valueString = \ strval ( $ args [ 1 ] ) ; $ key = new StringLiteral ( $ keyString ) ; $ value = new StringLiteral ( $ valueString ) ; return new self ( $ key , $ value ) ; }
Returns a KeyValuePair from native PHP arguments evaluated as strings

@param string $key
@param string $value
@return self
@throws \InvalidArgumentException
Returns a KeyValuePair from native PHP arguments evaluated as strings