'string', 'suggestions' => 'string[]'])] public function getFeedback(bool $isSoleMatch): array { return [ 'warning' => "", 'suggestions' => [ ] ]; } public function getRawGuesses(): float { $guesses = pow(self::BRUTEFORCE_CARDINALITY, mb_strlen($this->token)); if ($guesses === INF) { return PHP_FLOAT_MAX; } // small detail: make bruteforce matches at minimum one guess bigger than smallest allowed // submatch guesses, such that non-bruteforce submatches over the same [i..j] take precedence. if (mb_strlen($this->token) === 1) { $minGuesses = Scorer::MIN_SUBMATCH_GUESSES_SINGLE_CHAR + 1; } else { $minGuesses = Scorer::MIN_SUBMATCH_GUESSES_MULTI_CHAR + 1; } return max($guesses, $minGuesses); } }