1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Spiechu\SymfonyCommonsBundle\Event\ResponseSchemaCheck; |
||
6 | |||
7 | use Spiechu\SymfonyCommonsBundle\Service\SchemaValidator\ValidationResult; |
||
8 | use Symfony\Component\EventDispatcher\Event; |
||
9 | |||
10 | class CheckRequest extends Event |
||
0 ignored issues
–
show
Deprecated Code
introduced
by
Loading history...
|
|||
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 | /** |
||
33 | * @param string $format |
||
34 | * @param string $content |
||
35 | * @param string $responseSchemaLocation |
||
36 | */ |
||
37 | 8 | public function __construct(string $format, string $content, string $responseSchemaLocation) |
|
38 | { |
||
39 | 8 | $this->format = $format; |
|
40 | 8 | $this->content = $content; |
|
41 | 8 | $this->responseSchemaLocation = $responseSchemaLocation; |
|
42 | 8 | } |
|
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getFormat(): string |
||
48 | { |
||
49 | return $this->format; |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | 6 | public function getContent(): string |
|
56 | { |
||
57 | 6 | return $this->content; |
|
58 | } |
||
59 | |||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | 6 | public function getResponseSchemaLocation(): string |
|
64 | { |
||
65 | 6 | return $this->responseSchemaLocation; |
|
66 | } |
||
67 | |||
68 | /** |
||
69 | * @param ValidationResult $validationResult |
||
70 | * |
||
71 | * @return CheckRequest |
||
72 | */ |
||
73 | 7 | public function setValidationResult(ValidationResult $validationResult): self |
|
74 | { |
||
75 | 7 | $this->validationResult = $validationResult; |
|
76 | |||
77 | 7 | return $this; |
|
78 | } |
||
79 | |||
80 | /** |
||
81 | * @return null|ValidationResult |
||
82 | */ |
||
83 | 8 | public function getValidationResult(): ?ValidationResult |
|
84 | { |
||
85 | 8 | return $this->validationResult; |
|
86 | } |
||
87 | } |
||
88 |