BlocksPageController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A BodyClass() 0 10 2
1
<?php
2
3
namespace LeKoala\Blocks;
4
5
use PageController;
6
7
/**
8
 * Extend page controller
9
 *
10
 * @property \LeKoala\Blocks\BlocksPage dataRecord
11
 * @method \LeKoala\Blocks\BlocksPage data()
12
 * @mixin \LeKoala\Blocks\BlocksPage dataRecord
13
 */
14
class BlocksPageController extends PageController
15
{
16
    public function BodyClass()
17
    {
18
        $class = parent::BodyClass();
0 ignored issues
show
introduced by
The method BodyClass() does not exist on PageController. Are you sure you never get this type here, but always one of the subclasses? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
        /** @scrutinizer ignore-call */ 
19
        $class = parent::BodyClass();
Loading history...
19
20
        $arr = $this->data()->getBlocksListArray();
21
        if (!empty($arr)) {
22
            $class .= ' Starts-' . $arr[0];
23
        }
24
25
        return $class;
26
    }
27
}
28