Passed
Push — master ( 00c044...5a9be5 )
by Michael
02:49
created

Attribute   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 29
c 0
b 0
f 0
ccs 0
cts 5
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 4 1
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
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)
0 ignored issues
show
Unused Code introduced by
The parameter $name 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...
26
    {
27
        $this->name;
28
    }
29
30
    /**
31
     * Get name
32
     *
33
     * @return string
34
     */
35
    public function getName(): string
36
    {
37
        return $this->name;
38
    }
39
}