aboutsummaryrefslogtreecommitdiff
path: root/lib/models/Vote.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+github@gmail.com>2023-05-08 17:08:52 +0200
committerJan-Hendrik Willms <tleilax+github@gmail.com>2023-05-08 17:08:52 +0200
commita1fda2758e9c241ac3eb980ac8716dfedbe9dd3c (patch)
tree2190f0478fb153efdb8ba48ebb574c7691f4f351 /lib/models/Vote.php
parent244d00ed91ad2b4b83e902a45cd6def3d7bc7e86 (diff)
let phpcsfixer fix errors according to @PSR12 rules on lib/modelsphpcsfixer
Diffstat (limited to 'lib/models/Vote.php')
-rw-r--r--lib/models/Vote.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/models/Vote.php b/lib/models/Vote.php
index d3d6d75..2fcfa03 100644
--- a/lib/models/Vote.php
+++ b/lib/models/Vote.php
@@ -1,9 +1,10 @@
<?php
+
require_once 'lib/classes/QuestionType.interface.php';
class Vote extends QuestionnaireQuestion implements QuestionType
{
- public static function getIcon(bool $active = false) : Icon
+ public static function getIcon(bool $active = false): Icon
{
return Icon::create(static::getIconShape(), $active ? Icon::ROLE_CLICKABLE : Icon::ROLE_INFO);
}
@@ -22,7 +23,7 @@ class Vote extends QuestionnaireQuestion implements QuestionType
return _('Auswahlfrage');
}
- static public function getEditingComponent()
+ public static function getEditingComponent()
{
return ['vote-edit', ''];
}
@@ -54,8 +55,7 @@ class Vote extends QuestionnaireQuestion implements QuestionType
$userAnswer = $answers[$this->getId()]['answerdata']['answers'];
if (is_array($userAnswer)) {
$userAnswer = array_map('intval', $userAnswer);
- }
- else {
+ } else {
$userAnswer = (int) $userAnswer;
}
}