Passed
Pull Request — master (#31)
by
unknown
22:12 queued 07:10
created

RedirectsUsers   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 4
c 1
b 0
f 0
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A redirectPath() 0 7 3
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