UsersController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 17
c 1
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A view() 0 8 2
1
<?php namespace Anomaly\UsersModule\Http\Controller;
2
3
use Anomaly\Streams\Platform\Http\Controller\PublicController;
4
use Anomaly\UsersModule\User\Contract\UserRepositoryInterface;
5
6
/**
7
 * Class UsersController
8
 *
9
 * @link          http://pyrocms.com/
10
 * @author        PyroCMS, Inc. <[email protected]>
11
 * @author        Ryan Thompson <[email protected]>
12
 */
13
class UsersController extends PublicController
14
{
15
    /**
16
     * View a user profile.
17
     *
18
     * @param  UserRepositoryInterface               $users
19
     * @return \Illuminate\Contracts\View\View|mixed
20
     */
21
    public function view(UserRepositoryInterface $users)
22
    {
23
        if (!$user = $users->findByUsername($this->route->getParameter('username'))) {
24
            abort(404);
25
        }
26
27
        return $this->view->make('anomaly.module.users::users/view', compact('user'));
28
    }
29
}
30