Issues (21)

src/Event/ResponseSchemaCheck/CheckResult.php (1 issue)

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 CheckResult extends Event
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

10
class CheckResult extends /** @scrutinizer ignore-deprecated */ Event
Loading history...
11
{
12
    /**
13
     * @var string
14
     */
15
    protected $format;
16
17
    /**
18
     * @var string
19
     */
20
    protected $content;
21
22
    /**
23
     * @var ValidationResult
24
     */
25
    protected $validationResult;
26
27
    /**
28
     * @param string           $format
29
     * @param string           $content
30
     * @param ValidationResult $validationResult
31
     */
32 7
    public function __construct(string $format, string $content, ValidationResult $validationResult)
33
    {
34 7
        $this->format = $format;
35 7
        $this->content = $content;
36 7
        $this->validationResult = $validationResult;
37 7
    }
38
39
    /**
40
     * @return string
41
     */
42 3
    public function getFormat(): string
43
    {
44 3
        return $this->format;
45
    }
46
47
    /**
48
     * @return string
49
     */
50 1
    public function getContent(): string
51
    {
52 1
        return $this->content;
53
    }
54
55
    /**
56
     * @return ValidationResult
57
     */
58 7
    public function getValidationResult(): ValidationResult
59
    {
60 7
        return $this->validationResult;
61
    }
62
63
    /**
64
     * @return bool
65
     */
66 6
    public function isValid(): bool
67
    {
68 6
        return $this->validationResult->isValid();
69
    }
70
}
71