Completed
Push — master ( 6c1318...fd4dfb )
by Mahmoud
03:00
created

AssignRoleAction::run()   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
2
3
namespace App\Containers\Authorization\Actions;
4
5
use App\Containers\Authorization\Tasks\AssignRoleTask;
6
use App\Port\Action\Abstracts\Action;
7
8
/**
9
 * Class AssignRoleAction.
10
 *
11
 * @author Mahmoud Zalt <[email protected]>
12
 */
13
class AssignRoleAction extends Action
14
{
15
16
    /**
17
     * @var  \App\Containers\Authorization\Data\Repositories\AssignRoleTask
18
     */
19
    private $assignRoleTask;
20
21
    /**
22
     * GetAdminRoleAction constructor.
23
     *
24
     * @param \App\Containers\Authorization\Data\Repositories\AssignRoleTask $assignRoleTask
25
     */
26
    public function __construct(AssignRoleTask $assignRoleTask)
27
    {
28
        $this->assignRoleTask = $assignRoleTask;
0 ignored issues
show
Documentation Bug introduced by
It seems like $assignRoleTask of type object<App\Containers\Au...n\Tasks\AssignRoleTask> is incompatible with the declared type object<App\Containers\Au...itories\AssignRoleTask> of property $assignRoleTask.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
29
    }
30
31
    /**
32
     * @param $userId
33
     * @param $roleName
34
     */
35
    public function run($userId, $roleName)
36
    {
37
        return $this->assignRoleTask->run($userId, $roleName);
38
    }
39
}
40