PermissionsCountComposer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 3
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\ViewComposers\ViewComposer;
4
use Illuminate\Contracts\View\View;
5
6
/**
7
 * Class     PermissionsCountComposer
8
 *
9
 * @package  Arcanesoft\Auth\ViewComposers\Dashboard
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class PermissionsCountComposer extends ViewComposer
13
{
14
    /* -----------------------------------------------------------------
15
     |  Constants
16
     | -----------------------------------------------------------------
17
     */
18
    const VIEW = 'auth::admin._composers.dashboard.permissions-count-box';
19
20
    /* -----------------------------------------------------------------
21
     |  Main Methods
22
     | -----------------------------------------------------------------
23
     */
24
    /**
25
     * Compose the view.
26
     *
27
     * @param  \Illuminate\Contracts\View\View  $view
28
     */
29
    public function compose(View $view)
30
    {
31
        $view->with('permissionsCount', $this->getCachedPermissions()->count());
32
    }
33
}
34