19declare(strict_types=1);
84 ): array|float|bool|
int|string|null
88 'term' => $transformations->
normalize($this->term, $context),
89 'definition' => $transformations->
normalize($this->definition, $context),
99 return $this->
withPoints($transformations->
float($normalized[
'points']))
100 ->withTerm($transformations->
denormalize($normalized[
'term'], $this->term))
101 ->withDefinition($transformations->
denormalize($normalized[
'definition'], $this->definition));
Class for matching question definitions.
Class for matching question pairs.
withPoints(float $points)
assAnswerMatchingDefinition $definition
assAnswerMatchingTerm $term
fromNormalized(array $normalized, Transformations $transformations)
Restore the object from its normalized representation.
withTerm(assAnswerMatchingTerm $term)
withDefinition(assAnswerMatchingDefinition $definition)
toNormalized(Transformations $transformations, array $context=[])
Convert the internal state of the implementing object into a language-neutral array structure.
__construct(assAnswerMatchingTerm $term, assAnswerMatchingDefinition $definition, float $points=0.0)
Class for matching question terms.