public function deserialize($data, MatchQuestion $matchQuestion = null, array $options = [])
    {
        if (empty($matchQuestion)) {
            $matchQuestion = new MatchQuestion();
        }

        if (isset($data['penaty'])) {
            if (!empty($data['penalty']) || 0 === $data['penalty']) {
                $matchQuestion->setPenalty($data['penalty']);
            }
        }
        $this->sipe('random', 'setShuffle', $data, $matchQuestion);

        $this->deserializeLabels($matchQuestion, $data['secondSet'], $options);
        $this->deserializeProposals($matchQuestion, $data['firstSet'], $options);
        $this->deserializeSolutions($matchQuestion, $data['solutions']);

        return $matchQuestion;
    }
public function deserialize($data, MatchQuestion $matchQuestion = null, array $options = [])
    {
        if (empty($matchQuestion)) {
            $matchQuestion = new MatchQuestion();
        }

        if (isset($data['penaty'])) {
            if (!empty($data['penalty']) || 0 === $data['penalty']) {
                $matchQuestion->setPenalty($data['penalty']);
            }
        }
        $this->sipe('random', 'setShuffle', $data, $matchQuestion);

        $this->deserializeLabels($matchQuestion, $data['secondSet'], $options);
        $this->deserializeProposals($matchQuestion, $data['firstSet'], $options);
        $this->deserializeSolutions($matchQuestion, $data['solutions']);

        return $matchQuestion;
    }
public function deserialize ( $ data , MatchQuestion $ matchQuestion = null , array $ options = [ ] ) { if ( empty ( $ matchQuestion ) ) { $ matchQuestion = new MatchQuestion ( ) ; } if ( isset ( $ data [ 'penaty' ] ) ) { if ( ! empty ( $ data [ 'penalty' ] ) || 0 === $ data [ 'penalty' ] ) { $ matchQuestion -> setPenalty ( $ data [ 'penalty' ] ) ; } } $ this -> sipe ( 'random' , 'setShuffle' , $ data , $ matchQuestion ) ; $ this -> deserializeLabels ( $ matchQuestion , $ data [ 'secondSet' ] , $ options ) ; $ this -> deserializeProposals ( $ matchQuestion , $ data [ 'firstSet' ] , $ options ) ; $ this -> deserializeSolutions ( $ matchQuestion , $ data [ 'solutions' ] ) ; return $ matchQuestion ; }
Converts raw data into a Match question entity.

@param array         $data
@param MatchQuestion $matchQuestion
@param array         $options

@return MatchQuestion
Converts raw data into a Match question entity .