| 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; |
||
| 39 | public function handle(RoleRepositoryInterface $roles) |
||
| 40 | { |
||
| 41 | if (is_numeric($this->identifier)) { |
||
| 42 | return $roles->find($this->identifier); |
||
| 43 | } |
||
| 44 | |||
| 45 | if (!is_numeric($this->identifier)) { |
||
| 46 | return $roles->findBySlug($this->identifier); |
||
| 47 | } |
||
| 48 | |||
| 49 | return null; |
||
| 50 | } |
||
| 51 | } |
||
| 52 |