ManagerPortalComposer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A compose() 0 5 2
1
<?php
2
3
namespace App\Http\ViewComposers;
4
5
use Illuminate\View\View;
6
use Illuminate\Support\Facades\Auth;
7
8
class ManagerPortalComposer
9
{
10
    /**
11
     * Bind data to the view.
12
     *
13
     * @param  View  $view
14
     * @return void
15
     */
16
    public function compose(View $view)
17
    {
18
        $show_demo_notification = Auth::user() !== null && Auth::user()->isDemoManager();
19
        $view->with([
20
            'show_demo_notification' => $show_demo_notification,
21
        ]);
22
    }
23
}
24