1 | <?php |
||
22 | class LogEntry implements LogEntryInterface |
||
23 | { |
||
24 | use LogLevelTrait; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $message = 'log message'; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $level; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | */ |
||
39 | protected $context; |
||
40 | |||
41 | /** |
||
42 | * @param string $level |
||
|
|||
43 | * @param string $message |
||
44 | * @param array $context |
||
45 | */ |
||
46 | public function __construct(string $message = '', array $context = []) |
||
57 | |||
58 | /** |
||
59 | * {@inheritDoc} |
||
60 | */ |
||
61 | public function getMessage(): string |
||
65 | |||
66 | /** |
||
67 | * {@inheritDoc} |
||
68 | */ |
||
69 | public function getLevel(): string |
||
73 | |||
74 | /** |
||
75 | * {@inheritDoc} |
||
76 | */ |
||
77 | public function getContext(): array |
||
81 | |||
82 | /** |
||
83 | * {@inheritDoc} |
||
84 | */ |
||
85 | public function setLevel(string $level): LogEntryInterface |
||
93 | |||
94 | /** |
||
95 | * {@inheritDoc} |
||
96 | */ |
||
97 | public function setContext(array $context): LogEntryInterface |
||
102 | |||
103 | /** |
||
104 | * {@inheritDoc} |
||
105 | */ |
||
106 | public function getProcessors(): array |
||
110 | |||
111 | /** |
||
112 | * {@inheritDoc} |
||
113 | */ |
||
114 | public function __toString(): string |
||
118 | |||
119 | /** |
||
120 | * @param string $message message |
||
121 | * @param array $context |
||
122 | * @return string result |
||
123 | */ |
||
124 | protected function interpolate(string $message, array $context): string |
||
138 | } |
||
139 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.