Completed
Push — master ( 5a0a86...178907 )
by Samuel
32:19
created

src/Event/AbstractEvent.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/*
4
 * This file is part of the Ivory Serializer package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ivory\Serializer\Event;
13
14
use Ivory\Serializer\Context\ContextInterface;
15
use Ivory\Serializer\Mapping\TypeMetadataInterface;
16
use Symfony\Component\EventDispatcher\Event;
17
18
/**
19
 * @author GeLo <[email protected]>
20
 */
21
abstract class AbstractEvent extends Event
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated with message: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
22
{
23
    /**
24
     * @var mixed
25
     */
26
    protected $data;
27
28
    /**
29
     * @var TypeMetadataInterface
30
     */
31
    protected $type;
32
33
    /**
34
     * @var ContextInterface
35
     */
36
    private $context;
37
38
    /**
39
     * @param mixed                 $data
40
     * @param TypeMetadataInterface $type
41
     * @param ContextInterface      $context
42
     */
43 16
    public function __construct($data, TypeMetadataInterface $type, ContextInterface $context)
44
    {
45 16
        $this->data = $data;
46 16
        $this->type = $type;
47 16
        $this->context = $context;
48 16
    }
49
50
    /**
51
     * @return mixed
52
     */
53 16
    public function getData()
54
    {
55 16
        return $this->data;
56
    }
57
58
    /**
59
     * @return TypeMetadataInterface
60
     */
61 16
    public function getType()
62
    {
63 16
        return $this->type;
64
    }
65
66
    /**
67
     * @return ContextInterface
68
     */
69 16
    public function getContext()
70
    {
71 16
        return $this->context;
72
    }
73
}
74