Test Failed
Push — master ( a28393...a400a4 )
by David
06:01 queued 03:02
created

Adapters/CodeIgniter/controllers/dwoowelcome.php (3 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * Copyright (c) 2013-2016
4
 *
5
 * @category  Library
6
 * @package   Dwoo\Adapters\CodeIgniter\controllers
7
 * @author    Jordi Boggiano <[email protected]>
8
 * @author    David Sanchez <[email protected]>
9
 * @copyright 2008-2013 Jordi Boggiano
10
 * @copyright 2013-2016 David Sanchez
11
 * @license   http://dwoo.org/LICENSE Modified BSD License
12
 * @version   1.3.0
13
 * @date      2016-09-19
14
 * @link      http://dwoo.org/
15
 */
16
17
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...
18
{
19
    public function __construct()
20
    {
21
        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...
PHP4 style calls to parent constructors are not allowed; use "parent::__construct()" instead
Loading history...
22
    }
23
24
    public function index()
25
    {
26
        $this->load->library('Dwootemplate');
27
        $this->dwootemplate->assign('itshowlate', date('H:i:s'));
28
        $this->dwootemplate->display('dwoowelcome.tpl');
29
    }
30
}
31