Renderable_time::viewable()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 3
1
<?php declare(strict_types=1);
2
3
namespace Formularium\Frontend\Vuetify\Renderable;
4
5
use Formularium\Field;
6
use Formularium\HTMLNode;
7
use Formularium\Frontend\Vuetify\RenderableVuetifyInputTrait;
8
use Formularium\Frontend\Vuetify\RenderableVuetifyTrait;
9
10
class Renderable_time extends \Formularium\Renderable
11
{
12
    use RenderableVuetifyTrait;
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 $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...
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...
28
    {
29
        // add extra classes
30
        $previous->walk(
31
            function ($e) {
32
                if ($e instanceof HTMLNode) {
33
                    if ($e->getTag() === 'input') {
34
                        $e->setTag('v-time-picker');
35
                    }
36
                }
37
            }
38
        );
39
        return $previous;
40
    }
41
}
42