Passed
Pull Request — master (#154)
by Alex
07:05
created

MetadataControllerContainer   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
dl 0
loc 28
ccs 7
cts 7
cp 1
rs 10

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
namespace AlgoWeb\PODataLaravel\Controllers;
4
5
class MetadataControllerContainer
6
{
7
    private $metadata;
8
9 68
    /**
10
     * @param array $meta
11 68
     */
12 68
    public function setMetadata(array $meta)
13
    {
14 3
        $this->metadata = $meta;
15
    }
16 3
17
    /**
18
     * @return array
19 3
     */
20
    public function getMetadata()
21 3
    {
22
        return $this->metadata;
23
    }
24
25
    /**
26
     * @param $modelName
27
     * @param $verb
28
     * @return array
29
     */
30
    public function getMapping($modelName, $verb)
31
    {
32
        return $this->metadata[$modelName][$verb];
33
    }
34
}
35