DummyHookPlugin::afterHook()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace CaptainHook\App\Plugin;
4
5
use CaptainHook\App\Config;
6
use CaptainHook\App\Runner\Hook as RunnerHook;
7
8
class DummyHookPlugin extends Hook\Base
9
{
10
    public static int $beforeHookCalled = 0;
11
    public static int $beforeActionCalled = 0;
12
    public static int $afterActionCalled = 0;
13
    public static int $afterHookCalled = 0;
14
15
    public function beforeHook(RunnerHook $hook): void
16
    {
17
        self::$beforeHookCalled++;
18
    }
19
20
    public function beforeAction(RunnerHook $hook, Config\Action $action): void
21
    {
22
        self::$beforeActionCalled++;
23
    }
24
25
    public function afterAction(RunnerHook $hook, Config\Action $action): void
26
    {
27
        self::$afterActionCalled++;
28
    }
29
30
    public function afterHook(RunnerHook $hook): void
31
    {
32
        self::$afterHookCalled++;
33
    }
34
}
35