Code Duplication    Length = 5-5 lines in 2 locations

src/Sensorario/Resources/Container.php 2 locations

@@ 60-64 (lines=5) @@
57
    public function create($resource, array $constraints)
58
    {
59
        foreach ($constraints as $name => $value) {
60
            if (!isset($this->resources['resources'][$resource]['constraints']['allowed'])) {
61
                throw new RuntimeException(
62
                    'Not allowed `' . $name . '` constraint with value `' . $value . '`'
63
                );
64
            }
65
66
            if (!in_array($name, $this->resources['resources'][$resource]['constraints']['allowed'])) {
67
                throw new RuntimeException(
@@ 66-70 (lines=5) @@
63
                );
64
            }
65
66
            if (!in_array($name, $this->resources['resources'][$resource]['constraints']['allowed'])) {
67
                throw new RuntimeException(
68
                    'Not allowed `' . $name . '` constraint with value `' . $value . '`'
69
                );
70
            }
71
        }
72
    }
73