Test Failed
Push — main ( 6435b1...db043e )
by Paul
16:23 queued 07:02
created

Hooks   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 6
dl 0
loc 15
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A run() 0 7 2
A isInstalled() 0 3 1
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Integrations\BuddyBoss;
4
5
use GeminiLabs\SiteReviews\Hooks\AbstractHooks;
6
7
class Hooks extends AbstractHooks
8
{
9
    public function run(): void
10
    {
11
        if (!$this->isInstalled()) {
12
            return;
13
        }
14
        $this->hook(Controller::class, [
15
            ['filterProfileId', 'site-reviews/assigned_users/profile_id', 5],
16
        ]);
17
    }
18
19
    protected function isInstalled(): bool
20
    {
21
        return function_exists('bp_displayed_user_id');
22
    }
23
}
24