Code Duplication    Length = 8-8 lines in 5 locations

src/Sensorario/Resources/Container.php 5 locations

@@ 102-109 (lines=8) @@
99
        return $allowed;
100
    }
101
102
    public function mandatory($resource)
103
    {
104
        if (isset($this->resources['resources'][$resource]['constraints']['mandatory'])) {
105
            return $this->resources['resources'][$resource]['constraints']['mandatory'];
106
        }
107
108
        return [];
109
    }
110
111
    public function defaults($resource)
112
    {
@@ 111-118 (lines=8) @@
108
        return [];
109
    }
110
111
    public function defaults($resource)
112
    {
113
        if (isset($this->resources['resources'][$resource]['constraints']['defaults'])) {
114
            return $this->resources['resources'][$resource]['constraints']['defaults'];
115
        }
116
117
        return [];
118
    }
119
120
    public function rules($resource)
121
    {
@@ 120-127 (lines=8) @@
117
        return [];
118
    }
119
120
    public function rules($resource)
121
    {
122
        if (isset($this->resources['resources'][$resource]['constraints']['rules'])) {
123
            return $this->resources['resources'][$resource]['constraints']['rules'];
124
        }
125
126
        return [];
127
    }
128
129
    public function allowedValues($resource)
130
    {
@@ 129-136 (lines=8) @@
126
        return [];
127
    }
128
129
    public function allowedValues($resource)
130
    {
131
        if (isset($this->resources['resources'][$resource]['constraints']['allowedValues'])) {
132
            return $this->resources['resources'][$resource]['constraints']['allowedValues'];
133
        }
134
135
        return [];
136
    }
137
138
    public function rewrites()
139
    {
@@ 143-150 (lines=8) @@
140
        return $this->rewrites;
141
    }
142
143
    public function ranges($resource)
144
    {
145
        if (isset($this->resources['resources'][$resource]['constraints']['allowedRanges'])) {
146
            return $this->resources['resources'][$resource]['constraints']['allowedRanges'];
147
        }
148
149
        return [];
150
    }
151
152
    public function globals()
153
    {