1 | <?php |
||
44 | class Event extends BaseEvent |
||
45 | { |
||
46 | /** |
||
47 | * Constructor |
||
48 | * |
||
49 | * @param string $name |
||
50 | * @param array $data |
||
51 | * @param Container $container |
||
|
|||
52 | * |
||
53 | * @return void |
||
54 | */ |
||
55 | 39 | public function __construct($name, $data = array(), Container $container = null) |
|
56 | { |
||
57 | 39 | parent::__construct( |
|
58 | $name, array_merge( |
||
59 | $data, array( |
||
60 | 39 | 'container' => $container, |
|
61 | 'returnValue' => null |
||
62 | ) |
||
63 | ) |
||
64 | ); |
||
65 | 39 | } |
|
66 | |||
67 | /** |
||
68 | * Defines a returnValue which can be used to override standard return values by functions handling this event. |
||
69 | * |
||
70 | * @param mixed $value |
||
71 | * |
||
72 | * @return void |
||
73 | */ |
||
74 | 1 | public function setReturnValue($value) |
|
78 | |||
79 | /** |
||
80 | * Returns the "returnValue" if defined |
||
81 | * |
||
82 | * @return mixed |
||
83 | */ |
||
84 | 1 | public function getReturnValue() |
|
88 | |||
89 | /** |
||
90 | * Tells if the event has a return value defined |
||
91 | * |
||
92 | * @return boolean |
||
93 | */ |
||
94 | public function hasReturnValue() |
||
98 | |||
99 | /** |
||
100 | * Returns the Dependency Injection Container |
||
101 | * |
||
102 | * @return Container |
||
103 | */ |
||
104 | public function getContainer() |
||
108 | } |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.