1 | <?php |
||
33 | abstract class HandlerAbstract extends ObjectAbstract implements HandlerInterface |
||
34 | { |
||
35 | use FormatterAwareTrait; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | * @access protected |
||
40 | */ |
||
41 | protected $level; |
||
42 | |||
43 | /** |
||
44 | * Stop log propagation |
||
45 | * |
||
46 | * @var bool |
||
47 | * @access protected |
||
48 | */ |
||
49 | protected $stop; |
||
50 | |||
51 | /** |
||
52 | * Created with level handling |
||
53 | * |
||
54 | * @param string $logLevel |
||
|
|||
55 | * @param FormatterInterface $formatter |
||
56 | * @param bool $stopPropagation |
||
57 | * @access public |
||
58 | */ |
||
59 | public function __construct( |
||
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | public function __invoke(LogEntryInterface $logEntry) |
||
87 | |||
88 | /** |
||
89 | * Destructor |
||
90 | * |
||
91 | * @access public |
||
92 | */ |
||
93 | public function __destruct() |
||
97 | |||
98 | /** |
||
99 | * Is this handler handling this log ? |
||
100 | * |
||
101 | * @param LogEntryInterface $logEntry |
||
102 | * @return bool |
||
103 | * @access protected |
||
104 | */ |
||
105 | protected function isHandling(LogEntryInterface $logEntry)/*# : bool */ |
||
115 | |||
116 | /** |
||
117 | * Is this handler handling this log level ? |
||
118 | * |
||
119 | * @param string $level |
||
120 | * @return bool |
||
121 | * @access protected |
||
122 | */ |
||
123 | protected function isHandlingLevel(/*# string */ $level)/*# : bool */ |
||
131 | |||
132 | /** |
||
133 | * To be overriden by siblings |
||
134 | * |
||
135 | * @param LogEntryInterface $logEntry |
||
136 | * @return bool |
||
137 | * @access protected |
||
138 | */ |
||
139 | protected function isHandlingOther(LogEntryInterface $logEntry)/*# : bool */ |
||
143 | |||
144 | /** |
||
145 | * Write to the device |
||
146 | * |
||
147 | * @param LogEntryInterface $logEntry |
||
148 | * @access protected |
||
149 | */ |
||
150 | abstract protected function write(LogEntryInterface $logEntry); |
||
151 | |||
152 | /** |
||
153 | * Close the handler, to be extended by siblings |
||
154 | * |
||
155 | * @access protected |
||
156 | */ |
||
157 | protected function close() |
||
160 | |||
161 | /** |
||
162 | * Get EOL char base on platform windows or Unix |
||
163 | * |
||
164 | * @return string |
||
165 | * @access protected |
||
166 | */ |
||
167 | protected function getEol()/*# : string */ |
||
176 | |||
177 | /** |
||
178 | * Test to see if in CLI mode |
||
179 | * |
||
180 | * @return bool |
||
181 | * @access protected |
||
182 | */ |
||
183 | protected function isCliMode()/*# : bool */ |
||
187 | } |
||
188 |
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.