Passed
Push — master ( 197c27...f2cc15 )
by Paul
22:24 queued 07:48
created

Hooks::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Integrations\Elementor;
4
5
use GeminiLabs\SiteReviews\Contracts\HooksContract;
6
7
class Hooks implements HooksContract
8
{
9
    /**
10
     * @var Controller
11
     */
12
    public $controller;
13
14
    public function __construct()
15
    {
16
        $this->controller = glsr(Controller::class);
17
    }
18
19
    /**
20
     * @return void
21
     */
22
    public function run()
23
    {
24
        add_filter('site-reviews/enqueue/public/inline-script/after', [$this->controller, 'filterElementorPublicInlineScript'], 1);
25
        add_filter('site-reviews/defaults/star-rating/defaults', [$this->controller, 'filterElementorStarRatingDefaults']);
26
        add_action('elementor/init', [$this->controller, 'registerElementorCategory']);
27
        add_action('elementor/widgets/widgets_registered', [$this->controller, 'registerElementorWidgets']);
28
    }
29
}
30