Passed
Push — master ( f510e9...9822a2 )
by Paul
10:29
created

BlocksHooks   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
dl 0
loc 14
ccs 0
cts 3
cp 0
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 9 1
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Hooks;
4
5
use GeminiLabs\SiteReviews\Controllers\BlocksController;
6
7
class BlocksHooks extends AbstractHooks
8
{
9
    /**
10
     * @return void
11
     */
12
    public function run()
13
    {
14
        $this->hook(BlocksController::class, [
15
            ['filterAllowedBlockTypes', 'allowed_block_types_all', 10, 2],
16
            ['filterBlockCategories', 'block_categories_all'],
17
            ['filterUseBlockEditor', 'use_block_editor_for_post_type', 10, 2],
18
            ['registerAssets', 'init', 9], // This must be done before the blocks are registered
19
            ['registerBlocks', 'init'],
20
            ['replaceLegacyWidgets', 'widget_types_to_hide_from_legacy_widget_block'],
21
        ]);
22
    }
23
}
24