ConfigurationForm   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 10 1
1
<?php
2
/**
3
 * @copyright Copyright (c) 2011 - 2014 Aleksandr Torosh (http://wezoom.net)
4
 * @author Aleksandr Torosh <[email protected]>
5
 */
6
7
namespace Cms\Form;
8
9
use Application\Form\Form;
10
use Phalcon\Forms\Element\Check;
11
use Phalcon\Forms\Element\Select;
12
use Phalcon\Forms\Element\Text;
13
14
class ConfigurationForm extends Form
15
{
16
17
    public function initialize()
18
    {
19
        $this->add((new Check('DEBUG_MODE'))->setLabel('Debug mode, display application errors'));
0 ignored issues
show
Documentation introduced by
(new \Phalcon\Forms\Elem...ay application errors') is of type null, but the function expects a object<Phalcon\Forms\ElementInterface>.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
20
        $this->add((new Check('PROFILER'))->setLabel('DB Profiler'));
0 ignored issues
show
Documentation introduced by
(new \Phalcon\Forms\Elem...setLabel('DB Profiler') is of type null, but the function expects a object<Phalcon\Forms\ElementInterface>.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
21
        $this->add((new Check('DISPLAY_CHANGELOG'))->setLabel('Display Changelog at Admin dashboard startpage'));
0 ignored issues
show
Documentation introduced by
(new \Phalcon\Forms\Elem...n dashboard startpage') is of type null, but the function expects a object<Phalcon\Forms\ElementInterface>.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
22
        $this->add((new Check('WIDGETS_CACHE'))->setLabel('Widgets caching'));
0 ignored issues
show
Documentation introduced by
(new \Phalcon\Forms\Elem...abel('Widgets caching') is of type null, but the function expects a object<Phalcon\Forms\ElementInterface>.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
23
        $this->add((new Text('ADMIN_EMAIL'))->setLabel('Admin Email'));
0 ignored issues
show
Documentation introduced by
(new \Phalcon\Forms\Elem...setLabel('Admin Email') is of type null, but the function expects a object<Phalcon\Forms\ElementInterface>.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
24
        $this->add((new Check('TECHNICAL_WORKS'))->setLabel('Site is under maintenance'));
0 ignored issues
show
Documentation introduced by
(new \Phalcon\Forms\Elem... is under maintenance') is of type null, but the function expects a object<Phalcon\Forms\ElementInterface>.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
25
26
    }
27
28
}