Payment/Resolver/PaymentSubjectStateResolver.php
protected function setState(PaymentSubjectInterface $subject, $state)
    {
        if ($state !== $subject->getPaymentState()) {
            $subject->setPaymentState($state);

            return true;
        }

        return false;
    }
protected function setState(PaymentSubjectInterface $subject, $state)
    {
        if ($state !== $subject->getPaymentState()) {
            $subject->setPaymentState($state);

            return true;
        }

        return false;
    }
protected function setState ( PaymentSubjectInterface $ subject , $ state ) { if ( $ state !== $ subject -> getPaymentState ( ) ) { $ subject -> setPaymentState ( $ state ) ; return true ; } return false ; }
Sets the payment state.

@param PaymentSubjectInterface $subject
@param string                  $state

@return bool Whether the shipment state has been updated.
Sets the payment state .