Code Duplication    Length = 5-5 lines in 2 locations

src/Sensorario/Resources/Container.php 2 locations

@@ 49-53 (lines=5) @@
46
    public function create($resource, array $constraints)
47
    {
48
        foreach ($constraints as $name => $value) {
49
            if (!isset($this->resources['resources'][$resource]['constraints']['allowed'])) {
50
                throw new RuntimeException(
51
                    'Not allowed `' . $name . '` constraint'
52
                );
53
            }
54
55
            if (!in_array($name, $this->resources['resources'][$resource]['constraints']['allowed'])) {
56
                throw new RuntimeException(
@@ 55-59 (lines=5) @@
52
                );
53
            }
54
55
            if (!in_array($name, $this->resources['resources'][$resource]['constraints']['allowed'])) {
56
                throw new RuntimeException(
57
                    'Not allowed `' . $name . '` constraint'
58
                );
59
            }
60
        }
61
    }
62