Completed
Push — master ( 7fc8c5...40671f )
by Ryan
02:18
created

SetGuestRole   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 4 1
1
<?php namespace Anomaly\UsersModule\Role\Command;
2
3
use Anomaly\Streams\Platform\Support\Authorizer;
4
use Anomaly\UsersModule\Role\Contract\RoleRepositoryInterface;
5
use Illuminate\Contracts\Bus\SelfHandling;
6
7
/**
8
 * Class SetGuestRole
9
 *
10
 * @link          http://pyrocms.com/
11
 * @author        PyroCMS, Inc. <[email protected]>
12
 * @author        Ryan Thompson <[email protected]>
13
 * @package       Anomaly\UsersModule\Role\Command
14
 */
15
class SetGuestRole implements SelfHandling
16
{
17
18
    /**
19
     * Handle the command.
20
     *
21
     * @param RoleRepositoryInterface $roles
22
     * @param Authorizer              $authorizer
23
     */
24
    public function handle(RoleRepositoryInterface $roles, Authorizer $authorizer)
25
    {
26
        $authorizer->setGuest($roles->findBySlug('guest'));
27
    }
28
}
29