Completed
Push — master ( 6ffe9e...612694 )
by Gabriel
03:27
created

EmailCrons::cleanupData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Nip\MailModule\Utility;
4
5
use Nip\MailModule\Console\Commands\EmailsCleanupData;
6
use Nip\MailModule\Console\Commands\EmailsSend;
7
8
/**
9
 * Class EmailCrons
10
 * @package Nip\MailModule\Utility
11
 */
12
class EmailCrons
13
{
14
    /**
15
     * @return int
16
     */
17
    public static function send()
18
    {
19
        return (new EmailsSend())->handle();
20
    }
21
22
    public static function cleanup()
23
    {
24
        static::cleanupData();
25
        static::cleanupRecords();
26
    }
27
28
    /**
29
     * @return int
30
     */
31
    public static function cleanupRecords()
32
    {
33
        return (new EmailsCleanupData())->handle();
34
    }
35
36
    /**
37
     * @return int
38
     */
39
    public static function cleanupData()
40
    {
41
        return (new EmailsCleanupData())->handle();
42
    }
43
}
44