| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| 1 | <?php |
||
| 42 | private function _shouldLoadDemo() { |
||
|
1 ignored issue
–
show
|
|||
| 43 | |||
| 44 | if ( AdminPageFrameworkLoader_Utility::isSilentMode() ) { |
||
| 45 | return false; |
||
| 46 | } |
||
| 47 | |||
| 48 | // Check if the demo is enabled. |
||
| 49 | $_oOption = AdminPageFrameworkLoader_Option::getInstance(); |
||
| 50 | if ( ! $_oOption->get( 'enable_demo' ) ) { |
||
| 51 | return false; |
||
| 52 | } |
||
| 53 | |||
| 54 | return true; |
||
| 55 | |||
| 56 | } |
||
| 57 | |||
| 58 | } |
||
|
1 ignored issue
–
show
|
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.