1 | <?php |
||
33 | abstract class HandlerAbstract extends ObjectAbstract implements HandlerInterface |
||
34 | { |
||
35 | use FormatterAwareTrait; |
||
36 | |||
37 | /** |
||
38 | * Stop log propagation after this handler ? |
||
39 | * |
||
40 | * @var bool |
||
41 | * @access protected |
||
42 | */ |
||
43 | protected $stop; |
||
44 | |||
45 | /** |
||
46 | * Created with level handling |
||
47 | * |
||
48 | * @param string $level |
||
|
|||
49 | * @param FormatterInterface $formatter if any |
||
50 | * @param bool $stopPropagation if u want to |
||
51 | * @access public |
||
52 | * @since 2.0.1 removed level param |
||
53 | */ |
||
54 | public function __construct( |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function __invoke(LogEntryInterface $logEntry) |
||
80 | |||
81 | /** |
||
82 | * Destructor |
||
83 | * |
||
84 | * @access public |
||
85 | */ |
||
86 | public function __destruct() |
||
90 | |||
91 | /** |
||
92 | * Write to handler's device |
||
93 | * |
||
94 | * @param LogEntryInterface $logEntry |
||
95 | * @access protected |
||
96 | */ |
||
97 | abstract protected function write(LogEntryInterface $logEntry); |
||
98 | |||
99 | /** |
||
100 | * Is this handler handling this log ? |
||
101 | * |
||
102 | * To be overriden by child classes |
||
103 | * |
||
104 | * @param LogEntryInterface $logEntry |
||
105 | * @return bool |
||
106 | * @access protected |
||
107 | */ |
||
108 | protected function isHandling(LogEntryInterface $logEntry)/*# : bool */ |
||
112 | |||
113 | /** |
||
114 | * Close the handler, to be overriden by child classes |
||
115 | * |
||
116 | * @access protected |
||
117 | */ |
||
118 | protected function close() |
||
121 | |||
122 | /** |
||
123 | * Get EOL char base on the platform WIN or UNIX |
||
124 | * |
||
125 | * @return string |
||
126 | * @access protected |
||
127 | */ |
||
128 | protected function getEol()/*# : string */ |
||
136 | |||
137 | /** |
||
138 | * Test to see if in CLI mode |
||
139 | * |
||
140 | * @return bool |
||
141 | * @access protected |
||
142 | */ |
||
143 | protected function isCliMode()/*# : bool */ |
||
147 | } |
||
148 |
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.