Code Duplication    Length = 10-10 lines in 2 locations

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

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