Test Failed
Push — master ( 097a15...b8f91e )
by Martin
01:33
created

Service   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 38
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getId() 0 3 1
A getClass() 0 3 1
A getArguments() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace KingsonDe\Marshal\Example\Model;
6
7
class Service {
8
9
    /**
10
     * @var string
11
     */
12
    private $id;
13
14
    /**
15
     * @var string
16
     */
17
    private $class;
18
19
    /**
20
     * @var Service[]
21
     */
22
    private $arguments;
23
24
    public function __construct(string $id, string $class = '', Service ...$arguments) {
25
        $this->id        = $id;
26
        $this->class     = $class;
27
        $this->arguments = $arguments;
28
    }
29
30
    public function getId(): string {
31
        return $this->id;
32
    }
33
34
    public function getClass(): string {
35
        return $this->class;
36
    }
37
38
    /**
39
     * @return Service[]
40
     */
41
    public function getArguments(): array {
42
        return $this->arguments;
43
    }
44
}
45