Passed
Push — master ( 7c7fa2...d7cd6a )
by Michael
04:35
created

Attribute::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
declare(strict_types = 1);
3
4
namespace Mikemirten\Component\JsonApi\Mapper\Definition;
5
6
/**
7
 * Definition of attribute
8
 *
9
 * @package Mikemirten\Component\JsonApi\Mapper\Definition
10
 */
11
class Attribute
12
{
13
    /**
14
     * Unique name of attribute inside of attribute-object
15
     *
16
     * @var string
17
     */
18
    protected $name;
19
20
    /**
21
     * Attribute constructor.
22
     *
23
     * @param string $name
24
     */
25
    public function __construct(string $name)
26
    {
27
        $this->name = $name;
28
    }
29
30
    /**
31
     * Get name
32
     *
33
     * @return string
34
     */
35
    public function getName(): string
36
    {
37
        return $this->name;
38
    }
39
40
    /**
41
     * Merge a attribute into this one
42
     * Named data of given attribute will override existing one in the case of names conflict
43
     *
44
     * @param self $attribute
45
     */
46
    public function merge(self $attribute)
0 ignored issues
show
Unused Code introduced by
The parameter $attribute is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
47
    {
48
49
    }
50
}