ManagerForm   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 8 1
1
<?php
2
/**
3
 * @copyright Copyright (c) 2011 - 2014 Oleksandr Torosh (http://wezoom.net)
4
 * @author Oleksandr Torosh <[email protected]>
5
 */
6
7
namespace Seo\Form;
8
9
10
use Application\Form\Form;
11
use Phalcon\Forms\Element\Text;
12
use Phalcon\Forms\Element\TextArea;
13
14
class ManagerForm extends Form
15
{
16
17
    public function initialize()
18
    {
19
        $this->add((new Text('url', ['required' => 'required']))->setLabel('URL'));
0 ignored issues
show
Documentation introduced by
(new \Phalcon\Forms\Elem...ed')))->setLabel('URL') 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 Text('head_title'))->setLabel('&lt;title&gt;'));
0 ignored issues
show
Documentation introduced by
(new \Phalcon\Forms\Elem...tLabel('&lt;title&gt;') 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 TextArea('meta_description', ['style' => 'height: 4em; min-height: inherit']))->setLabel('&lt;meta name="description"&gt;'));
0 ignored issues
show
Documentation introduced by
(new \Phalcon\Forms\Elem...ame="description"&gt;') 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 TextArea('meta_keywords', ['style' => 'height: 4em; min-height: inherit']))->setLabel('&lt;meta name="keywords"&gt;'));
0 ignored issues
show
Documentation introduced by
(new \Phalcon\Forms\Elem...a name="keywords"&gt;') 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 TextArea('seo_text'))->setLabel('SEO Text in bottom of page'));
0 ignored issues
show
Documentation introduced by
(new \Phalcon\Forms\Elem...ext in bottom of page') 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
    }
25
26
}