DisableHook   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 12
ccs 2
cts 2
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A applyTo() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of CaptainHook
5
 *
6
 * (c) Sebastian Feldmann <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace CaptainHook\App\Runner\Config\Change;
13
14
use CaptainHook\App\Config;
15
16
/**
17
 * Class AddAction
18
 *
19
 * @package CaptainHook
20
 * @author  Sebastian Feldmann <[email protected]>
21
 * @link    https://github.com/captainhook-git/captainhook
22
 * @since   Class available since Release 4.2.0
23
 */
24
class DisableHook extends Hook
25
{
26
    /**
27
     * Apply changes to the given config
28
     *
29
     * @param  \CaptainHook\App\Config $config
30
     * @return void
31
     * @throws \Exception
32
     */
33 1
    public function applyTo(Config $config): void
34
    {
35 1
        $config->getHookConfig($this->hookToChange)->setEnabled(false);
36
    }
37
}
38