Code Duplication    Length = 11-11 lines in 2 locations

src/Storage/ConfiguredType.php 1 location

@@ 41-51 (lines=11) @@
38
    /**
39
     * Return the named option.
40
     */
41
    public function getOption($name)
42
    {
43
        if (!isset($this->options[$name])) {
44
            throw new \InvalidArgumentException(sprintf(
45
                'Unknown option "%s", known options: "%s"',
46
                $name, implode('", "', array_keys($this->options))
47
            ));
48
        }
49
50
        return $this->options[$name];
51
    }
52
}
53

src/Standard/View/ObjectView.php 1 location

@@ 20-30 (lines=11) @@
17
        $this->viewClosures = $viewClosures;
18
    }
19
20
    public function offsetGet($name)
21
    {
22
        if (!isset($this->viewClosures[$name])) {
23
            throw new \InvalidArgumentException(sprintf(
24
                'Child view "%s" has not been set, known children: "%s"',
25
                $name, implode('", "', array_keys($this->viewClosures))
26
            ));
27
        }
28
29
        return $this->viewClosures[$name]();
30
    }
31
32
    public function offsetExists($name)
33
    {