bad_line_score = $a["bad_line_score"] ?? -1.0; } function setBadLineScore(float $bad_line_score): void { $this->bad_line_score = $bad_line_score; } function getBadLineScore(): float { return $this->bad_line_score; } public function staticCheck(): void { $errs = $this->getTTDiffCntToCA($this->player_answer ?? ""); $mark = $this->getMaxMark() + $errs * $this->getBadLineScore(); $this->setMark($mark); } public function toArray(string $mode = "all"): array { $a = parent::toArray($mode); if ($mode === "all") { $a["bad_line_score"] = $this->bad_line_score; } $a["correct_answer"] = $this->getLogicFunction()->getTruthTable(); return $a; } }