Code Duplication    Length = 9-10 lines in 3 locations

src/models/Package.php 3 locations

@@ 269-278 (lines=10) @@
266
     * @return mixed
267
     * @throws InvalidConfigException
268
     */
269
    public function getResourceValue($type)
270
    {
271
        $method = 'getResourceValue_' . $type;
272
273
        if (method_exists($this, $method)) {
274
            return call_user_func([$this, $method]);
275
        }
276
277
        throw new InvalidConfigException("Resource type \"$type\" is not described in the Package");
278
    }
279
280
    /**
281
     * @param string $type
@@ 285-293 (lines=9) @@
282
     * @return string
283
     * @throws InvalidConfigException
284
     */
285
    public function getResourceTitle($type)
286
    {
287
        $method = 'getResourceTitle_' . $type;
288
        if (method_exists($this, $method)) {
289
            return call_user_func([$this, $method]);
290
        }
291
292
        throw new InvalidConfigException("Resource type \"$type\" is not described in the Package");
293
    }
294
295
    /**
296
     * @param $type
@@ 300-309 (lines=10) @@
297
     * @return array|null
298
     * @throws InvalidConfigException
299
     */
300
    public function getOverusePrice($type)
301
    {
302
        $method = 'getResourceOveruse_' . $type;
303
        if (method_exists($this, $method)) {
304
            return call_user_func([$this, $method]);
305
        }
306
307
        throw new InvalidConfigException("Overuse getter for resource type \"$type\" is not described in the Package");
308
309
    }
310
311
    /**
312
     * @param string $type