Passed
Push — master ( 3020a3...ce74a0 )
by Bruno
08:42
created

Renderable_relationship::_editable()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
nc 2
nop 3
dl 0
loc 7
rs 10
c 1
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Modelarium\Frontend\Bootstrap\Renderable;
4
5
use Formularium\Field;
6
use Formularium\Renderable;
7
use Formularium\Frontend\Bootstrap\RenderableBootstrapTrait;
8
use Formularium\HTMLNode;
9
10
class Renderable_relationship extends Renderable
11
{
12
    use RenderableBootstrapTrait;
13
    
14
    public function viewable($value, Field $field, HTMLNode $previous): HTMLNode
15
    {
16
        return $previous;
17
    }
18
19
    /**
20
     * Subcall of wrapper editable() from RenderableMaterializeTrait
21
     *
22
     * @param mixed $value
23
     * @param Field $field
24
     * @param HTMLNode $previous
25
     * @return HTMLNode
26
     */
27
    public function _editable($value, Field $field, HTMLNode $previous): HTMLNode
0 ignored issues
show
Unused Code introduced by
The parameter $field 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

27
    public function _editable($value, /** @scrutinizer ignore-unused */ Field $field, HTMLNode $previous): HTMLNode

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 $value 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

27
    public function _editable(/** @scrutinizer ignore-unused */ $value, Field $field, HTMLNode $previous): HTMLNode

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...
28
    {
29
        foreach ($previous->get('select') as $input) {
30
            $input->addAttribute('class', 'custom-select');
31
        }
32
33
        return $previous;
34
    }
35
}
36