Stock/Updater/StockSubjectUpdater.php
private function setSubjectState(StockSubjectInterface $subject, $state)
    {
        if ($subject->getStockState() != $state) {
            $subject->setStockState($state);

            return true;
        }

        return false;
    }
private function setSubjectState(StockSubjectInterface $subject, $state)
    {
        if ($subject->getStockState() != $state) {
            $subject->setStockState($state);

            return true;
        }

        return false;
    }
Sets the subject's stock state.

@param StockSubjectInterface $subject
@param string                $state

@return bool Whether the state has been changed.