Code Duplication    Length = 10-10 lines in 2 locations

app/Http/Controllers/Controller.php 1 location

@@ 52-61 (lines=10) @@
49
     *
50
     * @return Model\User
51
     */
52
    protected function getLoggedUser()
53
    {
54
        $user = $this->auth->user();
55
56
        if (!$user instanceof Model\User) {
57
            throw new \DomainException('Unable to find a valid instance of logged user.');
58
        }
59
60
        return $user;
61
    }
62
}
63

app/Http/Middleware/MiddlewareAbstract.php 1 location

@@ 53-62 (lines=10) @@
50
     *
51
     * @return User
52
     */
53
    protected function getLoggedUser()
54
    {
55
        $user = $this->auth->user();
56
57
        if (!$user instanceof User) {
58
            throw new \DomainException('Unable to find a valid instance of logged user.');
59
        }
60
61
        return $user;
62
    }
63
}
64