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

Currency   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 17
c 1
b 0
f 0
dl 0
loc 44
ccs 8
cts 12
cp 0.6667
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A metadata() 0 3 1
A setCurrency() 0 5 1
A getCurrency() 0 3 1
A getSymbol() 0 3 1
A setSymbol() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chemaclass\StockTicker\Domain\WriteModel;
6
7
final class Currency 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 CURRENCY = 'currency';
10
    public const SYMBOL = 'symbol';
11
12
    private const METADATA = [
13
        self::CURRENCY => [
14
            'type' => self::TYPE_STRING,
15
        ],
16
        self::SYMBOL => [
17
            'type' => self::TYPE_STRING,
18
        ],
19
    ];
20
21
    protected ?string $currency = null;
22
    protected ?string $symbol = null;
23
24
    public function getCurrency(): ?string
25
    {
26
        return $this->currency;
27
    }
28
29 1
    public function setCurrency(?string $currency): self
30
    {
31 1
        $this->currency = $currency;
32
33 1
        return $this;
34
    }
35
36
    public function getSymbol(): ?string
37
    {
38
        return $this->symbol;
39
    }
40
41 1
    public function setSymbol(?string $symbol): self
42
    {
43 1
        $this->symbol = $symbol;
44
45 1
        return $this;
46
    }
47
48 14
    protected function metadata(): array
49
    {
50 14
        return self::METADATA;
51
    }
52
}
53