Passed
Branch master (df2ee3)
by Dawid
07:19 queued 02:10
created

CheckRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiechu\SymfonyCommonsBundle\Event\ResponseSchemaCheck;
6
7
use Spiechu\SymfonyCommonsBundle\Service\ValidationResult;
8
use Symfony\Component\EventDispatcher\Event;
9
10
class CheckRequest extends Event
11
{
12
    /**
13
     * @var string
14
     */
15
    protected $format;
16
17
    /**
18
     * @var string
19
     */
20
    protected $content;
21
22
    /**
23
     * @var string
24
     */
25
    protected $responseSchemaLocation;
26
27
    /**
28
     * @var null|ValidationResult
29
     */
30
    protected $validationResult;
31
32 1
    public function __construct(string $format, string $content, string $responseSchemaLocation)
33
    {
34 1
        $this->format = $format;
35 1
        $this->content = $content;
36 1
        $this->responseSchemaLocation = $responseSchemaLocation;
37 1
    }
38
39
    public function getFormat(): string
40
    {
41
        return $this->format;
42
    }
43
44
    public function getContent(): string
45
    {
46
        return $this->content;
47
    }
48
49
    public function getResponseSchemaLocation(): string
50
    {
51
        return $this->responseSchemaLocation;
52
    }
53
54 1
    public function setValidationResult(ValidationResult $validationResult): self
55
    {
56 1
        $this->validationResult = $validationResult;
57
58 1
        return $this;
59
    }
60
61 1
    public function getValidationResult(): ?ValidationResult
62
    {
63 1
        return $this->validationResult;
64
    }
65
}
66