| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 15 |
| Ratio | 100 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 10 | View Code Duplication | public function toOptionArray() |
|
| 11 | { |
||
| 12 | $rolesCollection = $this->getAdminRolesCollection(); |
||
| 13 | $rolesArray = array(); |
||
| 14 | |||
| 15 | foreach ($rolesCollection as $role) { |
||
| 16 | /** @var Mage_Admin_Model_Role $role */ |
||
| 17 | $rolesArray[] = array( |
||
| 18 | 'value' => $role->getRoleName(), |
||
| 19 | 'label' => $role->getRoleName(), |
||
| 20 | ); |
||
| 21 | } |
||
| 22 | |||
| 23 | return $rolesArray; |
||
| 24 | } |
||
| 25 | |||
| 55 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.