MetadataControllerContainer   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
eloc 5
c 2
b 0
f 0
dl 0
loc 29
rs 10
ccs 7
cts 7
cp 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getMapping() 0 3 1
A getMetadata() 0 3 1
A setMetadata() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AlgoWeb\PODataLaravel\Controllers;
6
7
class MetadataControllerContainer
8
{
9 68
    /** @var array[] */
10
    private $metadata;
11 68
12 68
    /**
13
     * @param array[] $meta
14 3
     */
15
    public function setMetadata(array $meta): void
16 3
    {
17
        $this->metadata = $meta;
18
    }
19 3
20
    /**
21 3
     * @return array[]
22
     */
23
    public function getMetadata()
24
    {
25
        return $this->metadata;
26
    }
27
28
    /**
29
     * @param  string $modelName
30
     * @param  string $verb
31
     * @return mixed
32
     */
33
    public function getMapping($modelName, $verb)
34
    {
35
        return $this->metadata[$modelName][$verb];
36
    }
37
}
38