|
@@ 147-149 (lines=3) @@
|
| 144 |
|
case 'choice': |
| 145 |
|
$definition = new ChoiceInteractionDefinition(); |
| 146 |
|
|
| 147 |
|
if (isset($data['choices'])) { |
| 148 |
|
$definition = $definition->withChoices($this->denormalizeData($data['choices'], 'Xabbuh\XApi\Model\Interaction\InteractionComponent[]', $format, $context)); |
| 149 |
|
} |
| 150 |
|
break; |
| 151 |
|
case 'fill-in': |
| 152 |
|
$definition = new FillInInteractionDefinition(); |
|
@@ 191-193 (lines=3) @@
|
| 188 |
|
case 'sequencing': |
| 189 |
|
$definition = new SequencingInteractionDefinition(); |
| 190 |
|
|
| 191 |
|
if (isset($data['choices'])) { |
| 192 |
|
$definition = $definition->withChoices($this->denormalizeData($data['choices'], 'Xabbuh\XApi\Model\Interaction\InteractionComponent[]', $format, $context)); |
| 193 |
|
} |
| 194 |
|
break; |
| 195 |
|
case 'true-false': |
| 196 |
|
$definition = new TrueFalseInteractionDefinition(); |
|
@@ 209-212 (lines=4) @@
|
| 206 |
|
$definition = new Definition(); |
| 207 |
|
} |
| 208 |
|
|
| 209 |
|
if (isset($data['name'])) { |
| 210 |
|
$name = $this->denormalizeData($data['name'], 'Xabbuh\XApi\Model\LanguageMap', $format, $context); |
| 211 |
|
$definition = $definition->withName($name); |
| 212 |
|
} |
| 213 |
|
|
| 214 |
|
if (isset($data['description'])) { |
| 215 |
|
$description = $this->denormalizeData($data['description'], 'Xabbuh\XApi\Model\LanguageMap', $format, $context); |
|
@@ 214-217 (lines=4) @@
|
| 211 |
|
$definition = $definition->withName($name); |
| 212 |
|
} |
| 213 |
|
|
| 214 |
|
if (isset($data['description'])) { |
| 215 |
|
$description = $this->denormalizeData($data['description'], 'Xabbuh\XApi\Model\LanguageMap', $format, $context); |
| 216 |
|
$definition = $definition->withDescription($description); |
| 217 |
|
} |
| 218 |
|
|
| 219 |
|
if (isset($data['type'])) { |
| 220 |
|
$definition = $definition->withType(IRI::fromString($data['type'])); |