src/Execution/ErrorBuffer.php
public function push(string $errorMessage, ?string $key = null): self
    {
        if ($key === null) {
            $this->errors[] = $errorMessage;
        } else {
            $this->errors[$key][] = $errorMessage;
        }

        return $this;
    }
public function push(string $errorMessage, ?string $key = null): self
    {
        if ($key === null) {
            $this->errors[] = $errorMessage;
        } else {
            $this->errors[$key][] = $errorMessage;
        }

        return $this;
    }
public function push ( string $ errorMessage , ? string $ key = null ) : self { if ( $ key === null ) { $ this -> errors [ ] = $ errorMessage ; } else { $ this -> errors [ $ key ] [ ] = $ errorMessage ; } return $ this ; }
Push an error message into the buffer.

@param  string  $errorMessage
@param  string|null  $key
@return $this
Push an error message into the buffer .