ProgressData   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 53
c 0
b 0
f 0
wmc 6
lcom 0
cbo 0
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getCurrent() 0 4 1
A setCurrent() 0 4 1
A getTotal() 0 4 1
A setTotal() 0 4 1
A getProcessType() 0 4 1
A setProcessType() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * File: ProgressData.php
7
 *
8
 * @author Maciej Sławik <[email protected]>
9
 * @copyright Copyright (C) 2019 Lizard Media (http://lizardmedia.pl)
10
 */
11
12
namespace LizardMedia\VarnishWarmer\Model\ProgressHandler;
13
14
use LizardMedia\VarnishWarmer\Api\ProgressHandler\ProgressDataInterface;
15
use Magento\Framework\Model\AbstractExtensibleModel;
16
17
/**
18
 * Class ProgressData
19
 * @package LizardMedia\VarnishWarmer\Model\ProgressHandler
20
 */
21
class ProgressData extends AbstractExtensibleModel implements ProgressDataInterface
22
{
23
    /**
24
     * @return int|null
25
     */
26
    public function getCurrent()
27
    {
28
        return $this->getData(self::FIELD_CURRENT);
29
    }
30
31
    /**
32
     * @param int $current
33
     * @return void
34
     */
35
    public function setCurrent(int $current): void
36
    {
37
        $this->setData(self::FIELD_CURRENT, $current);
38
    }
39
40
    /**
41
     * @return int|null
42
     */
43
    public function getTotal()
44
    {
45
        return $this->getData(self::FIELD_TOTAL);
46
    }
47
48
    /**
49
     * @param int $total
50
     * @return void
51
     */
52
    public function setTotal(int $total): void
53
    {
54
        $this->setData(self::FIELD_TOTAL, $total);
55
    }
56
57
    /**
58
     * @return string|null
59
     */
60
    public function getProcessType()
61
    {
62
        return $this->getData(self::FIELD_PROCESS_TYPE);
63
    }
64
65
    /**
66
     * @param string $type
67
     * @return void
68
     */
69
    public function setProcessType(string $type): void
70
    {
71
        $this->setData(self::FIELD_PROCESS_TYPE, $type);
72
    }
73
}
74