Provider::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 3
1
<?php
2
3
namespace App\DTO;
4
5
use Stringable;
6
7
class Provider implements Stringable
8
{
9
    public function __construct(
10
        private string $name,
11
        private string $logo,
12
        private ?string $parent = null
13
    ) {}
14
15
    public function getName(): string
16
    {
17
        return $this->name;
18
    }
19
20
    public function getLogo(): string
21
    {
22
        return $this->logo;
23
    }
24
25
    public function getParent(): ?string
26
    {
27
        return $this->parent;
28
    }
29
30
    public function isNewBuildOnly(): bool
31
    {
32
        return null !== $this->parent;
33
    }
34
35
    /**
36
     * {@inheritDoc}
37
     */
38
    public function __toString(): string
39
    {
40
        return $this->name;
41
    }
42
}
43