ColumnHead   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getLabel() 0 3 1
1
<?php
2
3
namespace Itstructure\DetailView\Heads;
4
5
use Itstructure\DetailView\Traits\{Configurable, Attributable};
6
7
/**
8
 * Class ColumnHead
9
 * @package Itstructure\DetailView\Heads
10
 */
11
class ColumnHead
12
{
13
    use Configurable, Attributable;
14
15
    /**
16
     * @var string
17
     */
18
    protected $label;
19
20
    /**
21
     * ColumnHead constructor.
22
     * @param array $config
23
     */
24
    public function __construct(array $config)
25
    {
26
        $this->loadConfig($config);
27
    }
28
29
    /**
30
     * Get label for detail head.
31
     * @return string
32
     */
33
    public function getLabel(): string
34
    {
35
        return $this->label ?? '';
36
    }
37
}
38