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

RouterHooks   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
dl 0
loc 12
ccs 0
cts 4
cp 0
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 7 1
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Hooks;
4
5
use GeminiLabs\SiteReviews\Router;
6
7
class RouterHooks extends AbstractHooks
8
{
9
    /**
10
     * @return void
11
     */
12
    public function run()
13
    {
14
        $this->hook(Router::class, [
15
            ['routeAdminAjaxRequest', "wp_ajax_{$this->prefix}action"],
16
            ['routeAdminPostRequest', 'admin_init'],
17
            ['routePublicAjaxRequest', "wp_ajax_nopriv_{$this->prefix}action"],
18
            ['routePublicPostRequest', 'init'],
19
        ]);
20
    }
21
}
22