DownloadsStat::getMonthly()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of the wow-apps/symfony-packagist project
4
 * https://github.com/wow-apps/symfony-packagist
5
 *
6
 * (c) 2017 WoW-Apps
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WowApps\PackagistBundle\DTO;
13
14
/**
15
 * Class DownloadsStat
16
 *
17
 * @author Alexey Samara <[email protected]>
18
 * @package wow-apps/symfony-packagist
19
 */
20
class DownloadsStat
21
{
22
    /** @var int */
23
    private $total;
24
25
    /** @var int */
26
    private $monthly;
27
28
    /** @var int */
29
    private $daily;
30
31
    /**
32
     * DownloadsStat constructor.
33
     *
34
     * @param int $total
35
     * @param int $monthly
36
     * @param int $daily
37
     */
38
    public function __construct(int $total = 0, int $monthly = 0, int $daily = 0)
39
    {
40
        $this
41
            ->setTotal($total)
42
            ->setMonthly($monthly)
43
            ->setDaily($daily)
44
        ;
45
    }
46
47
    /**
48
     * @return int
49
     */
50
    public function getTotal(): int
51
    {
52
        return $this->total;
53
    }
54
55
    /**
56
     * @param int $total
57
     * @return DownloadsStat
58
     */
59
    public function setTotal(int $total): DownloadsStat
60
    {
61
        $this->total = $total;
62
        return $this;
63
    }
64
65
    /**
66
     * @return int
67
     */
68
    public function getMonthly(): int
69
    {
70
        return $this->monthly;
71
    }
72
73
    /**
74
     * @param int $monthly
75
     * @return DownloadsStat
76
     */
77
    public function setMonthly(int $monthly): DownloadsStat
78
    {
79
        $this->monthly = $monthly;
80
        return $this;
81
    }
82
83
    /**
84
     * @return int
85
     */
86
    public function getDaily(): int
87
    {
88
        return $this->daily;
89
    }
90
91
    /**
92
     * @param int $daily
93
     * @return DownloadsStat
94
     */
95
    public function setDaily(int $daily): DownloadsStat
96
    {
97
        $this->daily = $daily;
98
        return $this;
99
    }
100
}
101