MetadataControllerContainer::getMetadata()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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