1 | <?php |
||
15 | abstract class BaseMessageAdapter |
||
16 | { |
||
17 | protected $twig; |
||
18 | protected $eventDispatcher; |
||
19 | protected $configuration = []; |
||
20 | protected $channelName; |
||
21 | |||
22 | /** |
||
23 | * @param \Twig_Environment $twig |
||
24 | */ |
||
25 | public function setTemplating(\Twig_Environment $twig) |
||
29 | |||
30 | /** |
||
31 | * @param EventDispatcherInterface $eventDispatcher |
||
32 | */ |
||
33 | public function setDispatcher(EventDispatcherInterface $eventDispatcher) |
||
37 | |||
38 | /** |
||
39 | * @param $data |
||
40 | * @param $user |
||
41 | * @param $template |
||
42 | * @return mixed |
||
43 | */ |
||
44 | protected function renderTwigTemplate($data, $user, $template) |
||
54 | |||
55 | /** |
||
56 | * @param NotificationInterface $notification |
||
57 | */ |
||
58 | public function format(NotificationInterface $notification) |
||
86 | |||
87 | /** |
||
88 | * @param $dispatchData |
||
89 | * @param $messageData |
||
90 | * @param string $channel |
||
91 | * @return Message |
||
92 | */ |
||
93 | protected static function createMessage($dispatchData, $messageData, $channel = 'default') |
||
103 | |||
104 | /** |
||
105 | * @param array $notificationData |
||
106 | * @return array |
||
107 | */ |
||
108 | protected static function createMessagaData(array $notificationData) |
||
118 | |||
119 | /** |
||
120 | * @param $shouldImplement |
||
121 | * @param $type |
||
122 | * @throws MessageFormatException |
||
123 | */ |
||
124 | protected static function createFormatterException($shouldImplement, $type) |
||
131 | |||
132 | /** |
||
133 | * @param array $configuration |
||
134 | */ |
||
135 | public function setConfiguration(array $configuration) |
||
139 | |||
140 | /** |
||
141 | * @param mixed $channeName |
||
|
|||
142 | */ |
||
143 | public function setChannelName($channelName) |
||
147 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.