1 | <?php |
||||
2 | |||||
3 | /* |
||||
4 | * @phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps |
||||
5 | * @noinspection AutoloadingIssuesInspection |
||||
6 | */ |
||||
7 | |||||
8 | /** |
||||
9 | * Description plugin. |
||||
10 | * |
||||
11 | * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) |
||||
12 | * @author Matthias Schulte <[email protected]> |
||||
13 | * @author Mark C. Prins <[email protected]> |
||||
14 | * |
||||
15 | */ |
||||
16 | |||||
17 | use dokuwiki\Extension\SyntaxPlugin; |
||||
1 ignored issue
–
show
|
|||||
18 | |||||
19 | class syntax_plugin_description extends SyntaxPlugin |
||||
20 | { |
||||
21 | final public function getType(): string |
||||
22 | { |
||||
23 | return 'substition'; |
||||
24 | } |
||||
25 | |||||
26 | final public function getPType(): string |
||||
27 | { |
||||
28 | return 'block'; |
||||
29 | } |
||||
30 | |||||
31 | final public function getSort(): int |
||||
32 | { |
||||
33 | return 98; |
||||
34 | } |
||||
35 | |||||
36 | final public function connectTo($mode): void |
||||
37 | { |
||||
38 | $this->Lexer->addSpecialPattern('\{\{description>.+?\}\}', $mode, 'plugin_description'); |
||||
39 | } |
||||
40 | |||||
41 | final public function handle($match, $state, $pos, Doku_Handler $handler): array |
||||
1 ignored issue
–
show
The type
Doku_Handler was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||
42 | { |
||||
43 | $match = substr($match, 14, -2); // strip markup |
||||
44 | $match = hsc($match); |
||||
1 ignored issue
–
show
The function
hsc was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
45 | |||||
46 | return [$match]; |
||||
47 | } |
||||
48 | |||||
49 | final public function render($format, Doku_Renderer $renderer, $data): bool |
||||
1 ignored issue
–
show
The type
Doku_Renderer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||
50 | { |
||||
51 | $description = $data[0]; |
||||
52 | if (empty($description)) { |
||||
53 | return false; |
||||
54 | } |
||||
55 | |||||
56 | if ($format === 'metadata') { |
||||
57 | $renderer->meta['plugin_description']['keywords'] = $description; |
||||
58 | return true; |
||||
59 | } |
||||
60 | return false; |
||||
61 | } |
||||
62 | } |
||||
63 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths