Issues (21)

src/Event/ApiVersion/ApiVersionSetEvent.php (1 issue)

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiechu\SymfonyCommonsBundle\Event\ApiVersion;
6
7
use Spiechu\SymfonyCommonsBundle\Annotation\Controller\ApiVersion;
8
use Symfony\Component\EventDispatcher\Event;
9
10
class ApiVersionSetEvent 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 ApiVersionSetEvent extends /** @scrutinizer ignore-deprecated */ Event
Loading history...
11
{
12
    /**
13
     * @var string
14
     */
15
    protected $apiVersion;
16
17
    /**
18
     * @param ApiVersion $apiVersion
19
     */
20 13
    public function __construct(ApiVersion $apiVersion)
21
    {
22 13
        $this->apiVersion = $apiVersion->getApiVersion();
23 13
    }
24
25
    /**
26
     * @return string
27
     */
28 13
    public function getApiVersion(): string
29
    {
30 13
        return $this->apiVersion;
31
    }
32
}
33