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

Section::isFront()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
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