Code Duplication    Length = 8-8 lines in 4 locations

src/Sensorario/Resources/Container.php 4 locations

@@ 82-89 (lines=8) @@
79
        return $allowed;
80
    }
81
82
    public function mandatory($resource)
83
    {
84
        if (isset($this->resources['resources'][$resource]['constraints']['mandatory'])) {
85
            return $this->resources['resources'][$resource]['constraints']['mandatory'];
86
        }
87
88
        return [];
89
    }
90
91
    public function defaults($resource)
92
    {
@@ 91-98 (lines=8) @@
88
        return [];
89
    }
90
91
    public function defaults($resource)
92
    {
93
        if (isset($this->resources['resources'][$resource]['constraints']['defaults'])) {
94
            return $this->resources['resources'][$resource]['constraints']['defaults'];
95
        }
96
97
        return [];
98
    }
99
100
    public function rules($resource)
101
    {
@@ 100-107 (lines=8) @@
97
        return [];
98
    }
99
100
    public function rules($resource)
101
    {
102
        if (isset($this->resources['resources'][$resource]['constraints']['rules'])) {
103
            return $this->resources['resources'][$resource]['constraints']['rules'];
104
        }
105
106
        return [];
107
    }
108
109
    public function allowedValues($resource)
110
    {
@@ 109-116 (lines=8) @@
106
        return [];
107
    }
108
109
    public function allowedValues($resource)
110
    {
111
        if (isset($this->resources['resources'][$resource]['constraints']['allowedValues'])) {
112
            return $this->resources['resources'][$resource]['constraints']['allowedValues'];
113
        }
114
115
        return [];
116
    }
117
}
118