We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Total Complexity | 4 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | trait LibXmlTrait |
||
18 | { |
||
19 | /** |
||
20 | * Add the errors from the libxml error buffer as validation error. |
||
21 | * |
||
22 | * To enable user error handling, you need to use libxml_use_internal_errors(true) beforehand. |
||
23 | * |
||
24 | * @return void |
||
25 | */ |
||
26 | public function addErrorsOfBuffer(): void |
||
27 | { |
||
28 | $errors = libxml_get_errors(); |
||
29 | foreach ($errors as $error) { |
||
30 | $this->addError($error->message, $error->code); |
||
|
|||
31 | } |
||
32 | libxml_clear_errors(); |
||
33 | } |
||
34 | |||
35 | public function enableErrorBuffer(): void |
||
36 | { |
||
37 | libxml_use_internal_errors(true); |
||
38 | } |
||
39 | |||
40 | public function disableErrorBuffer(): void |
||
43 | } |
||
44 | } |
||
45 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.