Completed
Push — master ( d234f3...0a4926 )
by Jan Philipp
47s queued 12s
created

RequiredValue   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 4 1
A getDescription() 0 4 1
A hasDescription() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Psh\Config;
4
5
class RequiredValue
6
{
7
    private $name;
8
9
    private $description;
10
11
    public function __construct(string $name, ?string $description = null)
12
    {
13
        $this->name = $name;
14
        $this->description = $description;
15
    }
16
17
    public function getName(): string
18
    {
19
        return $this->name;
20
    }
21
22
    public function getDescription(): ?string
23
    {
24
        return $this->description;
25
    }
26
27
    public function hasDescription(): bool
28
    {
29
        return (bool) $this->description;
30
    }
31
}
32