$answers * @var array|null $scale Distribution of a scale slide, null for open questions * @var list $comments Comments of a scale or choice slide, oldest first */ use Cake\I18n\DateTime; $this->assign('title', $slide->question); $this->assign('noindex', '1'); $isChoice = $slide->type === 'choice'; $count = match (true) { $scale !== null => array_sum(array_column($scale['buckets'], 'count')), $isChoice => count($comments), default => count($answers), }; ?>

←

typeLabel()) ?> isPrivate()) : ?>· 🔒

question) ?>

·

isPrivate()) : ?>

: Number->format((float)$scale['average'], ['places' => 1, 'precision' => 1, 'locale' => 'de_DE'])) ?> isStarRating() ? __('von {0} Sternen', (int)$scale['max']) : '/ ' . (int)$scale['max'] ?>

$bucket) : $label = match (true) { $i === 0 && $scale['minLabel'] !== '' => $scale['minLabel'], $i === count($scale['buckets']) - 1 && $scale['maxLabel'] !== '' => $scale['maxLabel'], default => '', }; ?>
isStarRating() ? __('Sterne') : __('Wert') ?>
element('rating', ['slide' => $slide, 'value' => (int)$bucket['value']]) ?> () Number->format((float)$bucket['percent'], ['places' => 0, 'precision' => 1, 'locale' => 'de_DE'])) ?> %
hasComments()) : ?>