Passed
Push — master ( c0f32c...e879f4 )
by Chema
04:17 queued 41s
created

CompanyName::setShortName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chemaclass\StockTicker\Domain\WriteModel;
6
7
final class CompanyName extends AbstractWriteModel
0 ignored issues
show
Bug introduced by
The type Chemaclass\StockTicker\D...odel\AbstractWriteModel was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
{
9
    public const SHORT_NAME = 'shortName';
10
    public const LONG_NAME = 'longName';
11
12
    protected const PROPERTY_NAME_MAP = [
13
        'short_name' => self::SHORT_NAME,
14
        'shortName' => self::SHORT_NAME,
15
        'ShortName' => self::SHORT_NAME,
16
        'long_name' => self::LONG_NAME,
17
        'longName' => self::LONG_NAME,
18
        'LongName' => self::LONG_NAME,
19
    ];
20
21
    private const METADATA = [
22
        self::SHORT_NAME => [
23
            'type' => self::TYPE_STRING,
24
        ],
25
        self::LONG_NAME => [
26
            'type' => self::TYPE_STRING,
27
            'mandatory' => true,
28
        ],
29
    ];
30
31
    protected ?string $shortName = null;
32
    protected ?string $longName = null;
33
34 1
    public function getShortName(): ?string
35
    {
36 1
        return $this->shortName;
37
    }
38
39 1
    public function setShortName(?string $shortName): self
40
    {
41 1
        $this->shortName = $shortName;
42
43 1
        return $this;
44
    }
45
46 2
    public function getLongName(): ?string
47
    {
48 2
        return $this->longName;
49
    }
50
51 2
    public function setLongName(?string $longName): self
52
    {
53 2
        $this->longName = $longName;
54
55 2
        return $this;
56
    }
57
58 17
    protected function metadata(): array
59
    {
60 17
        return self::METADATA;
61
    }
62
}
63