GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — analysis-d0YOlw ( 094a36 )
by butschster
08:36
created

Trix   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 9
dl 0
loc 30
rs 10
c 2
b 1
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A toArray() 0 4 1
1
<?php
2
3
namespace SleepingOwl\Admin\Form\Element;
4
5
use SleepingOwl\Admin\Traits\Collapsed;
6
7
class Trix extends NamedFormElement
8
{
9
    use Collapsed;
10
11
    /**
12
     * @var bool|null
13
     */
14
    protected $collapsed;
15
16
    public function __construct($path, $label = null)
17
    {
18
        parent::__construct($path, $label);
19
20
        $this->setHtmlAttributes([
21
            'class' => 'trix-data',
22
        ]);
23
    }
24
25
    /**
26
     * @var string
27
     */
28
    protected $view = 'form.element.trix';
29
30
    /**
31
     * @return array
32
     */
33
    public function toArray()
34
    {
35
        return parent::toArray() + [
36
            'collapsed' => $this->getCollapsed(),
37
        ];
38
    }
39
}
40