Passed
Pull Request — master (#6)
by Joachim
04:07
created

Error   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
eloc 10
dl 0
loc 39
rs 10
c 1
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A __toString() 0 3 1
A getMessage() 0 3 1
A setReport() 0 3 1
A setMessage() 0 3 1
A getReport() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Setono\SyliusStockMovementPlugin\Model;
6
7
class Error implements ErrorInterface
8
{
9
    /** @var int */
10
    protected $id;
11
12
    /** @var ReportInterface|null */
13
    protected $report;
14
15
    /** @var string|null */
16
    protected $message;
17
18
    public function __toString(): string
19
    {
20
        return (string) $this->message;
21
    }
22
23
    public function getId(): ?int
24
    {
25
        return $this->id;
26
    }
27
28
    public function getReport(): ?ReportInterface
29
    {
30
        return $this->report;
31
    }
32
33
    public function setReport(?ReportInterface $report): void
34
    {
35
        $this->report = $report;
36
    }
37
38
    public function getMessage(): ?string
39
    {
40
        return $this->message;
41
    }
42
43
    public function setMessage(string $message): void
44
    {
45
        $this->message = $message;
46
    }
47
}
48