CurrentUserComposer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A compose() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of Gitamin.
5
 *
6
 * Copyright (C) 2015-2016 The Gitamin Team
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Gitamin\Composers;
13
14
use Illuminate\Contracts\View\View;
15
use Illuminate\Support\Facades\Auth;
16
17
class CurrentUserComposer
18
{
19
    /**
20
     * Bind data to the view.
21
     *
22
     * @param \Illuminate\Contracts\View\View $view
23
     */
24
    public function compose(View $view)
25
    {
26
        $view->withCurrentUser(Auth::user());
0 ignored issues
show
Bug introduced by
The method withCurrentUser() does not seem to exist on object<Illuminate\Contracts\View\View>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
27
    }
28
}
29