Code Duplication    Length = 8-8 lines in 3 locations

Persister/PersisterRegistry.php 1 location

@@ 44-51 (lines=8) @@
41
     *
42
     * @throws \InvalidArgumentException if no persister was registered for the index and type
43
     */
44
    public function getPersister($index, $type)
45
    {
46
        if (!isset($this->persisters[$index][$type])) {
47
            throw new \InvalidArgumentException(sprintf('No persister was registered for index "%s" and type "%s".', $index, $type));
48
        }
49
50
        return $this->container->get($this->persisters[$index][$type]);
51
    }
52
}
53

Provider/PagerProviderRegistry.php 1 location

@@ 90-97 (lines=8) @@
87
     *
88
     * @throws \InvalidArgumentException if no provider was registered for the index and type
89
     */
90
    public function getProvider($index, $type)
91
    {
92
        if (!isset($this->providers[$index][$type])) {
93
            throw new \InvalidArgumentException(sprintf('No provider was registered for index "%s" and type "%s".', $index, $type));
94
        }
95
96
        return $this->container->get($this->providers[$index][$type]);
97
    }
98
}
99

Provider/ProviderRegistry.php 1 location

@@ 101-108 (lines=8) @@
98
     *
99
     * @throws \InvalidArgumentException if no provider was registered for the index and type
100
     */
101
    public function getProvider($index, $type)
102
    {
103
        if (!isset($this->providers[$index][$type])) {
104
            throw new \InvalidArgumentException(sprintf('No provider was registered for index "%s" and type "%s".', $index, $type));
105
        }
106
107
        return $this->container->get($this->providers[$index][$type]);
108
    }
109
}
110