Code Duplication    Length = 5-5 lines in 2 locations

src/Sensorario/Resources/Container.php 2 locations

@@ 73-77 (lines=5) @@
70
    public function create($resource, array $constraints)
71
    {
72
        foreach ($constraints as $name => $value) {
73
            if (!isset($this->resources['resources'][$resource]['constraints']['allowed'])) {
74
                throw new RuntimeException(
75
                    'Not allowed `' . $name . '` constraint with value `' . $value . '`'
76
                );
77
            }
78
79
            if (!in_array($name, $this->resources['resources'][$resource]['constraints']['allowed'])) {
80
                throw new RuntimeException(
@@ 79-83 (lines=5) @@
76
                );
77
            }
78
79
            if (!in_array($name, $this->resources['resources'][$resource]['constraints']['allowed'])) {
80
                throw new RuntimeException(
81
                    'Not allowed `' . $name . '` constraint with value `' . $value . '`'
82
                );
83
            }
84
        }
85
    }
86