code: public function setLegalDocumentType( $legalDocumentType )
      {
          if (!in_array( intval( $legalDocumentType ), $this->documentTypes )) {
              throw new InvalidArgumentException( sprintf( 'Invalid document type (%s)', $legalDocumentType ) );
          }
  
          $this->legalDocumentType = $legalDocumentType;
  
          return $this;
      }
docs: @param  int $legalDocumentType
  
  @return $this