src/Query/Query.php
public function withParameter(string $key, $parameter): self
    {
        $clause = $this->clauses->last();

        if (!$clause instanceof Clause\Parametrable) {
            throw new NonParametrableClause;
        }

        $clause = $clause->withParameter($key, $parameter);
        $query = new self;
        $query->clauses = $this
            ->clauses
            ->dropEnd(1)
            ->add($clause);

        return $query;
    }
public function withParameter(string $key, $parameter): self
    {
        $clause = $this->clauses->last();

        if (!$clause instanceof Clause\Parametrable) {
            throw new NonParametrableClause;
        }

        $clause = $clause->withParameter($key, $parameter);
        $query = new self;
        $query->clauses = $this
            ->clauses
            ->dropEnd(1)
            ->add($clause);

        return $query;
    }
public function withParameter ( string $ key , $ parameter ) : self { $ clause = $ this -> clauses -> last ( ) ; if ( ! $ clause instanceof Clause \ Parametrable ) { throw new NonParametrableClause ; } $ clause = $ clause -> withParameter ( $ key , $ parameter ) ; $ query = new self ; $ query -> clauses = $ this -> clauses -> dropEnd ( 1 ) -> add ( $ clause ) ; return $ query ; }
Attach the given parameter to the last clause

@param string $key
@param mixed $parameter

@throws NonParametrableClause

@return self
Attach the given parameter to the last clause