. /** * The class represents questions number per each difficulty, this is what * {@link questions_repository::count_questions_number_per_difficulty()} returns. * The purpose of this class is keeping the related pieces of data together, as the client code normally requires both * difficulty level and number of questions for this difficulty set to perform its task. * * @copyright 2022 onwards Vitaly Potenko * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace mod_adaptivequiz\local\repository; final class questions_number_per_difficulty { /** * @var int $difficulty */ private $difficulty; /** * @var int $questionsnumber */ private $questionsnumber; public function __construct(int $difficulty, int $questionsnumber) { $this->difficulty = $difficulty; $this->questionsnumber = $questionsnumber; } public function difficulty(): int { return $this->difficulty; } public function questions_number(): int { return $this->questionsnumber; } }