Completed
Branch 4.0 (c710b5)
by Serhii
02:04
created

AbstractData   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 54
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 4 1
A setType() 0 4 1
A getName() 0 4 1
A getType() 0 4 1
A __construct() 0 4 1
1
<?php
2
/**
3
 * @author Serhii Nekhaienko <[email protected]>
4
 * @license GPL
5
 * @copyright Serhii Nekhaienko &copy 2018
6
 * @version 4.0.0
7
 * @project browser-detector
8
 */
9
10
namespace EndorphinStudio\Detector\Data;
11
12
13
abstract class AbstractData
14
{
15
    /**
16
     * @var Result Link to Result object
17
     */
18
    protected $result;
19
20
    /**
21
     * @var string Name
22
     */
23
    protected $name;
24
25
    /**
26
     * @param string $name
27
     */
28
    public function setName(string $name)
29
    {
30
        $this->name = $name;
31
    }
32
33
    /**
34
     * @param string $type
35
     */
36
    public function setType(string $type)
37
    {
38
        $this->type = $type;
39
    }
40
41
    /**
42
     * @var string Type
43
     */
44
    protected $type;
45
46
    /**
47
     * @return string
48
     */
49
    public function getName(): string
50
    {
51
        return $this->name;
52
    }
53
54
    /**
55
     * @return string
56
     */
57
    public function getType(): string
58
    {
59
        return $this->type;
60
    }
61
62
    public function __construct(Result $result)
63
    {
64
        $this->result = $result;
65
    }
66
}