Completed
Push — master ( 02f92d...9c9507 )
by Sebastian
15:38
created

Section::section()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 8
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
1
<?php
2
3
namespace App\Services\Navigation;
4
5
class Section
6
{
7
    public function section() : string
0 ignored issues
show
Coding Style Best Practice introduced by
Please use __construct() instead of a PHP4-style constructor that is named after the class.
Loading history...
8
    {
9
        if(request()->segment(1) === 'blender') {
10
            return 'back';
11
        }
12
13
        return 'front';
14
    }
15
16
    public function isFront() : bool
17
    {
18
        return $this->section() === 'front';
19
    }
20
21
    public function isBack() : bool
22
    {
23
        return $this->section() === 'back';
24
    }
25
}
26