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

SetGuestRole::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 2
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