Main::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: onysko
5
 * Date: 10.06.2015
6
 * Time: 16:43
7
 */
8
namespace samsoncms\app\security\tab;
9
10
use samsoncms\form\field\Generic;
11
use samsoncms\form\tab\Entity;
12
use samsonframework\core\RenderInterface;
13
use samsonframework\orm\QueryInterface;
14
use samsonframework\orm\Record;
15
16
/**
17
 * SamsonCMS application main form tab for security group
18
 * @package samsoncms\app\security\tab
19
 */
20
class Main extends Entity
21
{
22
    /** @var string Tab name or identifier */
23
    protected $name = 'Главная';
24
25
    /** @inheritdoc */
26
    public function __construct(RenderInterface $renderer, QueryInterface $query, Record $entity)
27
    {
28
        $this->fields = array(
0 ignored issues
show
Documentation Bug introduced by
It seems like array(new \samsoncms\for...вание', true), 0)) of type array<integer,object<sam...orm\\field\\Generic>"}> is incompatible with the declared type array<integer,object<samsoncms\form\tab\Generic>> of property $fields.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
29
            new Generic('Name', t('Название', true), 0),
0 ignored issues
show
Deprecated Code introduced by
The function t() has been deprecated with message: Should be used as $this->system->getContainer()->geti18n()->translate()|plural()

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
30
        );
31
32
        // Call parent constructor to define all class fields
33
        parent::__construct($renderer, $query, $entity);
34
    }
35
}
36