Conditions | 6 |
Paths | 6 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 42 |
Changes | 0 |
1 | <?php |
||
9 | /** |
||
10 | * Register our hooks. |
||
11 | */ |
||
12 | public function __construct() { |
||
13 | add_action( 'enqueue_block_editor_assets', array( $this, 'editor_scripts' ) ); |
||
14 | add_action( 'init', array( $this, 'register_blocks' ), 11 ); |
||
15 | } |
||
16 | |||
17 | /** |
||
18 | * Enqueue our scripts. |
||
19 | */ |
||
20 | abstract public function editor_scripts(); |
||
21 | |||
22 | /** |
||
23 | * Register our Easy Forms block callback. |
||
24 | */ |
||
25 | public function register_blocks() { |
||
26 | register_block_type( |
||
27 | static::BLOCK_NAMESPACE . static::BLOCK, |
||
28 | array( |
||
43 |
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.