Passed
Branch v2-dev (d50d65)
by Henri
01:22
created

CurrentTrait::currentAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace HnrAzevedo\Router;
4
5
trait CurrentTrait{
6
    use Helper;
7
8
    public static function current(): array
9
    {
10
        self::getInstance()->hasCurrentRoute();
11
        return self::getInstance()->currentRoute;
0 ignored issues
show
Bug introduced by
The property currentRoute is declared private in HnrAzevedo\Router\Router and cannot be accessed from this context.
Loading history...
12
    }
13
14
    public static function currentName(): string
15
    {
16
        self::getInstance()->hasCurrentRoute();
17
        return self::getInstance()->currentRoute['name'];
0 ignored issues
show
Bug introduced by
The property currentRoute is declared private in HnrAzevedo\Router\Router and cannot be accessed from this context.
Loading history...
18
    }
19
20
    public static function currentAction()
21
    {
22
        self::getInstance()->hasCurrentRoute();
23
        return self::getInstance()->currentRoute['action'];
0 ignored issues
show
Bug introduced by
The property currentRoute is declared private in HnrAzevedo\Router\Router and cannot be accessed from this context.
Loading history...
24
    }
25
    
26
}
27