Passed
Push — master ( 194ed3...36a821 )
by
unknown
15:01 queued 11:05
created

RedirectsUsers::redirectPath()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 7
rs 10
cc 3
nc 3
nop 0
1
<?php
2
3
namespace Fouladgar\MobileVerification\Concerns;
4
5
trait RedirectsUsers
6
{
7
    /**
8
     * Get the post register / login redirect path.
9
     *
10
     * @return string
11
     */
12
    public function redirectPath()
13
    {
14
        if (method_exists($this, 'redirectTo')) {
15
            return $this->redirectTo();
16
        }
17
18
        return property_exists($this, 'redirectTo') ? $this->redirectTo : '/home';
19
    }
20
}
21