1 | <?php |
||
30 | abstract class AbstractRunner implements RunnerInterface |
||
31 | { |
||
32 | /** @var PublisherInterface */ |
||
33 | private $publisher; |
||
34 | |||
35 | /** @var ContextInterface */ |
||
36 | private $context; |
||
37 | |||
38 | /** |
||
39 | * AbstractRunner constructor. |
||
40 | * @param PublisherInterface $publisher |
||
|
|||
41 | * @param ContextInterface $context |
||
42 | */ |
||
43 | 27 | public function __construct(PublisherInterface $publisher = null, ContextInterface $context = null) |
|
51 | |||
52 | /** |
||
53 | * @return PublisherInterface |
||
54 | */ |
||
55 | 20 | final protected function getPublisher() |
|
59 | |||
60 | /** |
||
61 | * getContext |
||
62 | * @return ContextInterface|null |
||
63 | */ |
||
64 | 13 | final protected function getContext() { |
|
67 | |||
68 | /** |
||
69 | * @inheritdoc |
||
70 | */ |
||
71 | 18 | final public function setContext(ContextInterface $context) { |
|
74 | |||
75 | /** |
||
76 | * @inheritdoc |
||
77 | */ |
||
78 | 18 | final public function clearContext() |
|
82 | } |
||
83 |
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.