detectionTypes = $detectionTypes; } public function isSuspicious(string $type, LoginAttemptInterface $loginAttempt): bool { return isset($this->detectionTypes[$type]) ? $this->detectionTypes[$type]->isSuspiciousAttempt($loginAttempt) : false; } }