Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Anomaly\UsersModule\Role\Command; |
||
40 | public function handle(RoleRepositoryInterface $roles) |
||
41 | { |
||
42 | if (is_numeric($this->identifier)) { |
||
43 | return $roles->find($this->identifier); |
||
44 | } |
||
45 | |||
46 | if (!is_numeric($this->identifier)) { |
||
47 | return $roles->findBySlug($this->identifier); |
||
48 | } |
||
49 | |||
50 | return null; |
||
51 | } |
||
52 | } |
||
53 |