Completed
Branch dev (31fb20)
by Raffael
03:39
created

AbstractHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 16
ccs 2
cts 4
cp 0.5
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A loop() 0 3 1
A exit() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * TaskScheduler
7
 *
8
 * @author      Raffael Sahli <[email protected]>
9
 * @copyright   Copryright (c) 2017-2018 gyselroth GmbH (https://gyselroth.com)
10
 * @license     MIT https://opensource.org/licenses/MIT
11
 */
12
13
namespace TaskScheduler;
14
15
abstract class AbstractHandler
16
{
17
    /**
18
     * This method may seem useless but is actually very useful to mock the loop.
19
     */
20
    protected function loop(): bool
21
    {
22
        return true;
23
    }
24
25
    /**
26
     * This method may seem useless but is actually very useful to mock exits.
27
     */
28 1
    protected function exit(): bool
29
    {
30 1
        return true;
31
    }
32
}
33