TypeHandler   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 3 2
1
<?php
2
/**
3
 * Automation tool mixed with code generator for easier continuous development
4
 *
5
 * @link      https://github.com/hiqdev/hidev
6
 * @package   hidev
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2018, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hidev\handlers;
12
13
/**
14
 * Handler for typed files.
15
 *
16
 * If there is a template then renders with it.
17
 * Else renders with renderType.
18
 */
19
class TypeHandler extends TemplateHandler
20
{
21 3
    public function render($data)
22
    {
23 3
        return $this->existsTemplate() ? $this->renderTemplate($data) : $this->renderType($data);
0 ignored issues
show
Bug introduced by
The method renderType() does not exist on hidev\handlers\TypeHandler. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

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

23
        return $this->existsTemplate() ? $this->renderTemplate($data) : $this->/** @scrutinizer ignore-call */ renderType($data);
Loading history...
24
    }
25
}
26