| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| 1 | <?php |
||
| 20 | public function __construct() { |
||
| 21 | |||
| 22 | if ( ! $this->_shouldLoadDemo() ) { |
||
| 23 | return; |
||
| 24 | } |
||
| 25 | |||
| 26 | // Backward compatibility. |
||
| 27 | define( 'APFDEMO_FILE', AdminPageFrameworkLoader_Registry::$sFilePath ); |
||
| 28 | define( 'APFDEMO_DIRNAME', AdminPageFrameworkLoader_Registry::$sDirPath ); |
||
| 29 | |||
| 30 | do_action( 'admin_page_framework_loader_action_before_loading_demo' ); |
||
| 31 | |||
| 32 | // Include example components. |
||
| 33 | include( AdminPageFrameworkLoader_Registry::$sDirPath . '/example/admin-page-framework-demo-bootstrap.php' ); |
||
| 34 | |||
| 35 | do_action( 'admin_page_framework_loader_action_after_loading_demo' ); |
||
| 36 | |||
| 37 | } |
||
| 38 | /** |
||
| 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.