| Conditions | 6 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 40 | public function onAfterInit() |
||
| 41 | { |
||
| 42 | $project_key = $this->getProjectKey(); |
||
| 43 | $env_type = $this->getEnvType(); |
||
| 44 | $member_status = $this->getMemberStatus(); |
||
| 45 | |||
| 46 | if ($project_key) { |
||
| 47 | if ($env_type == Config::inst()->get('Director', 'environment_type')) { |
||
| 48 | if (($member_status && Member::currentUserID() != 0) || !$member_status) { |
||
| 49 | Requirements::customScript($this->owner->renderWith('BugherdHeroTool'), 'BugherdHeroTool'); |
||
| 50 | } |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 | } |
||
| 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.