code: protected function setState(InvoiceSubjectInterface $subject, $state)
      {
          if ($state !== $subject->getInvoiceState()) {
              $subject->setInvoiceState($state);
  
              return true;
          }
  
          return false;
      }
docs: Sets the shipment state.
  
  @param InvoiceSubjectInterface $subject
  @param string                   $state
  
  @return bool Whether the shipment state has been updated.