Passed
Push — master ( 853bda...782fe1 )
by Guillaume
06:08
created

TimerService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A deleteTimer() 0 3 1
1
<?php
2
3
namespace Godbout\Alfred\Time\Services;
4
5
abstract class TimerService
6
{
7
    public $allowsEmptyProject = true;
8
9
    public $allowsEmptyTag = true;
10
11
    abstract public function startTimer();
12
13
    abstract public function runningTimer();
14
15
    abstract public function stopCurrentTimer();
16
17
    abstract public function continueTimer($timerId);
18
19
    public function deleteTimer($timerId)
0 ignored issues
show
Unused Code introduced by
The parameter $timerId is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

19
    public function deleteTimer(/** @scrutinizer ignore-unused */ $timerId)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
20
    {
21
        return false;
22
    }
23
24
    abstract public function projects();
25
26
    abstract public function tags();
27
28
    abstract public function pastTimers();
29
30 56
    public function __toString()
31
    {
32 56
        return strtolower((new \ReflectionClass(static::class))->getShortName());
33
    }
34
}
35