Code Duplication    Length = 10-10 lines in 2 locations

src/Kunstmaan/AdminBundle/Helper/Security/OAuth/OAuthUserCreator.php 2 locations

@@ 84-93 (lines=10) @@
81
     *
82
     * @return string[]|null
83
     */
84
    private function getAccessLevels($email)
85
    {
86
        foreach ($this->hostedDomains as $hostedDomain) {
87
            if (preg_match('/'.$hostedDomain['domain_name'].'$/', $email)) {
88
                return $hostedDomain['access_levels'];
89
            }
90
        }
91
92
        return null;
93
    }
94
95
    /**
96
     * This method returns wether a domain for the given email has been configured
@@ 102-111 (lines=10) @@
99
     *
100
     * @return bool
101
     */
102
    private function isConfiguredDomain($email)
103
    {
104
        foreach ($this->hostedDomains as $hostedDomain) {
105
            if (preg_match('/'.$hostedDomain['domain_name'].'$/', $email)) {
106
                return true;
107
            }
108
        }
109
110
        return false;
111
    }
112
}
113