public function addInstrucao($instrucao) { if (count($this->getInstrucoes()) > 8) { throw new \Exception('Atingido o máximo de 5 instruções.'); } $this->instrucoes[] = $instrucao; return $this; }