TypeHandler::render()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 2
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 2
rs 10
c 0
b 0
f 0
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