DefaultCrons::getCrons()   A
last analyzed

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 0
Metric Value
c 0
b 0
f 0
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\Core\Annotations\Service;
6
7
/**
8
 * @Service(tags={{"name"="cron"}})
9
 */
10
class DefaultCrons implements CronDefinition
11
{
12
    private const MINUTE = 'minute';
13
    private const HOURLY = 'hourly';
14
    private const DAILY  = 'daily';
15
16
    /**
17
     * @return string[]
18
     */
19 2
    public static function getCrons()
20
    {
21
        return [
22 2
            self::MINUTE => '* * * * *',
23 2
            self::HOURLY => '@hourly',
24 2
            self::DAILY  => '@daily',
25
        ];
26
    }
27
}
28