Code Duplication    Length = 10-10 lines in 2 locations

eZ/Publish/Core/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProvider.php 1 location

@@ 46-55 (lines=10) @@
43
        return false;
44
    }
45
46
    public function getSiteAccess(string $name): SiteAccess
47
    {
48
        foreach ($this->providers as $provider) {
49
            if ($provider->isDefined($name)) {
50
                return $provider->getSiteAccess($name);
51
            }
52
        }
53
54
        throw new \RuntimeException("Undefined siteaccess: $name");
55
    }
56
}
57

eZ/Publish/Core/MVC/Symfony/SiteAccess/SiteAccessService.php 1 location

@@ 48-57 (lines=10) @@
45
        return false;
46
    }
47
48
    public function get(string $name): SiteAccess
49
    {
50
        foreach ($this->providers as $provider) {
51
            if ($provider->isDefined($name)) {
52
                return $provider->getSiteAccess($name);
53
            }
54
        }
55
56
        throw new NotFoundException('SiteAccess', $name);
57
    }
58
59
    public function getAll(): iterable
60
    {