| Total Complexity | 5 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class AuthorizationSeeder extends Seeder |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var AuthorizationService |
||
| 15 | */ |
||
| 16 | protected $service; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * AuthorizationSeeder constructor. |
||
| 20 | * |
||
| 21 | * @param $service |
||
| 22 | */ |
||
| 23 | public function __construct(AuthorizationContract $service) |
||
| 24 | { |
||
| 25 | $this->service = $service; |
||
|
|
|||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Run the database seeds. |
||
| 30 | * |
||
| 31 | * @return void |
||
| 32 | */ |
||
| 33 | public function run() |
||
| 38 | } |
||
| 39 | |||
| 40 | protected function createPermissions(): void |
||
| 41 | { |
||
| 42 | $permissions = PermissionManager::getAllPermissions(); |
||
| 43 | $this->service->createPermissions(collect($permissions)->flatten()->toArray()); |
||
| 44 | } |
||
| 45 | |||
| 46 | protected function createRoles(): void |
||
| 50 | } |
||
| 51 | } |
||
| 53 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.