Completed
Push — master ( 66ec7e...c9ec0a )
by Matze
07:32
created

DefaultCrons::getCrons()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
crap 1
1
<?php
2
3
namespace BrainExe\Core\Cron;
4
5
use BrainExe\Annotations\Annotations\Service;
6
use BrainExe\Core\Cron\CronDefinition;
7
8
/**
9
 * @Service("Crons.Default", public=false, tags={{"name"="cron"}})
10
 */
11
class DefaultCrons implements CronDefinition
12
{
13
    const MINUTE = 'minute';
14
    const HOURLY = 'hourly';
15
    const DAILY  = 'daily';
16
17
    /**
18
     * @return string[]
19
     */
20 3
    public static function getCrons()
21
    {
22
        return [
23 3
            self::MINUTE => '* * * * *',
24 3
            self::HOURLY => '@hourly',
25 3
            self::DAILY  => '@daily',
26
        ];
27
    }
28
}
29