Collection   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 18
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setMeta() 0 4 1
A getMeta() 0 8 2
1
<?php
2
3
/*
4
 * This file is part of gpupo/pipe2
5
 *
6
 * (c) Gilmar Pupo <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * For more information, see
12
 * <https://opensource.gpupo.com/pipe2/>.
13
 */
14
15
namespace Gpupo\Pipe2\Merge\Attributes;
16
17
use Gpupo\Common\Entity\CollectionAbstract;
18
use Gpupo\Common\Entity\CollectionInterface;
19
20
class Collection extends CollectionAbstract implements CollectionInterface
21
{
22
    protected $meta;
23
24
    public function setMeta(Array $meta)
25
    {
26
        $this->meta = new self($meta);
27
    }
28
29
    public function getMeta()
30
    {
31
        if (empty($this->meta)) {
32
            $this->setMeta([]);
33
        }
34
35
        return $this->meta;
36
    }
37
}
38