1 | <?php |
||
2 | |||
3 | /** |
||
4 | * Description plugin. |
||
5 | * |
||
6 | * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) |
||
7 | * @author Matthias Schulte <[email protected]> |
||
8 | * @author Mark C. Prins <[email protected]> |
||
9 | * |
||
10 | * @phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps |
||
11 | * @noinspection AutoloadingIssuesInspection |
||
12 | */ |
||
13 | |||
14 | use dokuwiki\Extension\SyntaxPlugin; |
||
1 ignored issue
–
show
|
|||
15 | |||
16 | class syntax_plugin_description extends SyntaxPlugin |
||
17 | { |
||
18 | final public function getType(): string |
||
19 | { |
||
20 | return 'substition'; |
||
21 | } |
||
22 | |||
23 | final public function getPType(): string |
||
24 | { |
||
25 | return 'block'; |
||
26 | } |
||
27 | |||
28 | final public function getSort(): int |
||
29 | { |
||
30 | return 98; |
||
31 | } |
||
32 | |||
33 | final public function connectTo($mode): void |
||
34 | { |
||
35 | $this->Lexer->addSpecialPattern('\{\{description>.+?\}\}', $mode, 'plugin_description'); |
||
36 | } |
||
37 | |||
38 | 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 ![]() |
|||
39 | { |
||
40 | $match = substr($match, 14, -2); // strip markup |
||
41 | $match = hsc($match); |
||
42 | |||
43 | return [$match]; |
||
44 | } |
||
45 | |||
46 | 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 ![]() |
|||
47 | { |
||
48 | $description = $data[0]; |
||
49 | if (empty($description)) { |
||
50 | return false; |
||
51 | } |
||
52 | |||
53 | if ($format === 'metadata') { |
||
54 | $renderer->meta['plugin_description']['keywords'] = $description; |
||
55 | return true; |
||
56 | } |
||
57 | return false; |
||
58 | } |
||
59 | } |
||
60 |
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