Passed
Push — master ( 3109ad...89528c )
by Peter
02:44
created

DefinitionList   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 37
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A buildImage() 0 3 1
A getIdentifier() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AbterPhp\Website\Template\Builder\ContentList;
6
7
use AbterPhp\Framework\Constant\Html5;
8
use AbterPhp\Framework\Template\IBuilder;
9
use AbterPhp\Website\Domain\Entities\ContentList as Entity;
10
use AbterPhp\Website\Domain\Entities\ContentListItem as Item;
11
12
class DefinitionList extends Base implements IBuilder
13
{
14
    use ItemTrait;
15
16
    const IDENTIFIER = 'definition-list';
17
18
    protected $defaultListTag    = Html5::TAG_DL;
19
    protected $defaultItemTag    = '';
20
    protected $defaultLabelTag   = Html5::TAG_DT;
21
    protected $defaultContentTag = Html5::TAG_DD;
22
23
    protected $defaultListClass = 'definition-list';
24
25
    protected $defaultWithLabel = '1';
26
27
    /**
28
     * @return string
29
     */
30
    public function getIdentifier(): string
31
    {
32
        return static::IDENTIFIER;
33
    }
34
35
    /**
36
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
37
     *
38
     * @param Item            $item
39
     * @param Entity          $list
40
     * @param <string,string> $tags
0 ignored issues
show
Documentation Bug introduced by
The doc comment <string,string> at position 0 could not be parsed: Unknown type name '<' at position 0 in <string,string>.
Loading history...
41
     * @param <string,string> $classes
42
     * @param <string,string> $options
43
     *
44
     * @return string
45
     */
46
    protected function buildImage(Item $item, Entity $list, array $tags, array $classes, array $options): string
0 ignored issues
show
Unused Code introduced by
The parameter $item is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

46
    protected function buildImage(/** @scrutinizer ignore-unused */ Item $item, Entity $list, array $tags, array $classes, array $options): string

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $list is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

46
    protected function buildImage(Item $item, /** @scrutinizer ignore-unused */ Entity $list, array $tags, array $classes, array $options): string

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $options is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

46
    protected function buildImage(Item $item, Entity $list, array $tags, array $classes, /** @scrutinizer ignore-unused */ array $options): string

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $tags is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

46
    protected function buildImage(Item $item, Entity $list, /** @scrutinizer ignore-unused */ array $tags, array $classes, array $options): string

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $classes is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

46
    protected function buildImage(Item $item, Entity $list, array $tags, /** @scrutinizer ignore-unused */ array $classes, array $options): string

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
47
    {
48
        return '';
49
    }
50
}
51