public function setInstrucoes($instrucoes) { if (count($instrucoes) > 8) { throw new \Exception('Máximo de 8 instruções.'); } $this->instrucoes = $instrucoes; return $this; }