Test Failed
Branch 1.2 (261ddf)
by David
05:02
created

dwoowelcome::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
class dwoowelcome extends Controller
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
4
{
5
    public function __construct()
6
    {
7
        parent::Controller();
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (Controller() instead of __construct()). Are you sure this is correct? If so, you might want to change this to $this->Controller().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
Coding Style introduced by
PHP4 style calls to parent constructors are not allowed; use "parent::__construct()" instead
Loading history...
8
    }
9
10
    public function index()
11
    {
12
        $this->load->library('Dwootemplate');
13
        $this->dwootemplate->assign('itshowlate', date('H:i:s'));
14
        $this->dwootemplate->display('dwoowelcome.tpl');
15
    }
16
}
17