public function isCorrect()
    {
        if ($this->hasCorrectResponse() === true) {
            $correctResponse = $this->getCorrectResponse();

            if ($correctResponse instanceof Comparable) {
                return $correctResponse->equals($this->getValue());
            } else {
                return $correctResponse === $this->getValue();
            }
        }

        return false;
    }
public function isCorrect()
    {
        if ($this->hasCorrectResponse() === true) {
            $correctResponse = $this->getCorrectResponse();

            if ($correctResponse instanceof Comparable) {
                return $correctResponse->equals($this->getValue());
            } else {
                return $correctResponse === $this->getValue();
            }
        }

        return false;
    }
public function isCorrect ( ) { if ( $ this -> hasCorrectResponse ( ) === true ) { $ correctResponse = $ this -> getCorrectResponse ( ) ; if ( $ correctResponse instanceof Comparable ) { return $ correctResponse -> equals ( $ this -> getValue ( ) ) ; } else { return $ correctResponse === $ this -> getValue ( ) ; } } return false ; }
Whether the value of the ResponseVariable matches its
correct response.

@return boolean
Whether the value of the ResponseVariable matches its correct response .