Completed
Push — master ( 22fa00...44c771 )
by ARCANEDEV
07:45
created

PermissionsCountComposer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 22
ccs 0
cts 3
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A compose() 0 4 1
1
<?php namespace Arcanesoft\Auth\ViewComposers\Dashboard;
2
3
use Arcanesoft\Auth\Models\Permission;
4
use Arcanesoft\Auth\ViewComposers\ViewComposer;
5
use Illuminate\Contracts\View\View;
6
7
class PermissionsCountComposer extends ViewComposer
8
{
9
    /* ------------------------------------------------------------------------------------------------
10
     |  Constants
11
     | ------------------------------------------------------------------------------------------------
12
     */
13
    const VIEW = 'auth::foundation._composers.dashboard.permissions-count-box';
14
15
    /* ------------------------------------------------------------------------------------------------
16
     |  Main Functions
17
     | ------------------------------------------------------------------------------------------------
18
     */
19
    /**
20
     * Compose the view.
21
     *
22
     * @param  \Illuminate\Contracts\View\View  $view
23
     */
24
    public function compose(View $view)
25
    {
26
        $view->with('permissionsCount', $this->getCachedPermissions()->count());
27
    }
28
}
29