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

Hooks   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A run() 0 6 1
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