Code Duplication    Length = 6-6 lines in 2 locations

lib/FilterData.php 1 location

@@ 11-16 (lines=6) @@
8
{
9
    public function offsetGet($key)
10
    {
11
        if (!isset($this[$key])) {
12
            throw new \InvalidArgumentException(sprintf(
13
                'Unknown key "%s", known keys "%s"',
14
                $key, implode('", "', array_keys((array) $this))
15
            ));
16
        }
17
18
        return parent::offsetGet($key);
19
    }

lib/GridMetadataFactory.php 1 location

@@ 40-45 (lines=6) @@
37
            return reset($grids);
38
        }
39
40
        if (!isset($grids[$variant])) {
41
            throw new \InvalidArgumentException(sprintf(
42
                'Unknown grid variant "%s", available variants: "%s"',
43
                $variant, implode('", "', array_keys($grids))
44
            ));
45
        }
46
47
        return $grids[$variant];
48
    }