Completed
Push — master ( 3b0b6a...263c36 )
by Guillaume
02:53
created

Setup::toggl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 8
Ratio 100 %

Importance

Changes 0
Metric Value
dl 8
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Godbout\Alfred\Time\Menus;
4
5
use Godbout\Alfred\Workflow\Icon;
6
use Godbout\Alfred\Workflow\Item;
7
use Godbout\Alfred\Workflow\ScriptFilter;
8
9 View Code Duplication
class Setup extends Menu
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
    public static function scriptFilter()
12
    {
13
        ScriptFilter::add(
14
            self::toggl(),
15
            self::harvest()
16
        );
17
18
        ScriptFilter::sortItems();
19
    }
20
21
    private static function toggl()
22
    {
23
        return Item::create()
24
            ->title('Setup Toggl')
25
            ->subtitle('')
26
            ->icon(Icon::create('resources/icons/toggl.png'))
27
            ->arg('toggl_setup');
28
    }
29
30
    private static function harvest()
31
    {
32
        return Item::create()
33
            ->title('Setup Harvest')
34
            ->subtitle('')
35
            ->icon(Icon::create('resources/icons/harvest.png'))
36
            ->arg('harvest_setup');
37
    }
38
}
39