Passed
Push — master ( e83847...16b30f )
by Radu
01:36
created

OutputLoader   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 9
dl 0
loc 29
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A cli() 0 3 1
A html() 0 3 1
A htmlPage() 0 3 1
A __construct() 0 6 1
A json() 0 3 1
1
<?php
2
namespace ParcelValue\ApiClient;
3
4
use WebServCo\Framework\Framework;
5
6
final class OutputLoader extends \WebServCo\Framework\AbstractOutputLoader
7
{
8
    public function __construct($projectPath)
9
    {
10
        parent::__construct(
11
            $projectPath,
12
            Framework::library('HtmlOutput'),
13
            Framework::library('JsonOutput')
14
        );
15
    }
16
17
    public function html($data, $template)
18
    {
19
        return parent::html($data, $template);
20
    }
21
22
    public function htmlPage($data, $pageTemplate, $mainTemplate = null)
23
    {
24
        return parent::htmlPage($data, $pageTemplate, $mainTemplate);
25
    }
26
27
    public function json($data)
28
    {
29
        return parent::json($data);
30
    }
31
32
    public function cli($string, $eol = true)
33
    {
34
        return parent::cli($string, $eol);
0 ignored issues
show
Bug introduced by
Are you sure the usage of parent::cli($string, $eol) targeting WebServCo\Framework\AbstractOutputLoader::cli() seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
35
    }
36
}
37