Passed
Pull Request — master (#1)
by Rafal
07:10
created

FollowersDataProvider::hasTotal()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
declare(strict_types=1);
3
namespace SpotifyApiConnect\Domain\DataTransferObject;
4
5
/**
6
 * Auto generated data provider
7
 */
8
final class FollowersDataProvider extends \Xervice\DataProvider\Business\Model\DataProvider\AbstractDataProvider implements \Xervice\DataProvider\Business\Model\DataProvider\DataProviderInterface
9
{
10
    /** @var int */
11
    protected $total;
12
13
14
    /**
15
     * @return int
16
     */
17
    public function getTotal(): ?int
18
    {
19
        return $this->total;
20
    }
21
22
23
    /**
24
     * @param int $total
25
     * @return FollowersDataProvider
26
     */
27
    public function setTotal(?int $total = null)
28
    {
29
        $this->total = $total;
30
31
        return $this;
32
    }
33
34
35
    /**
36
     * @return FollowersDataProvider
37
     */
38
    public function unsetTotal()
39
    {
40
        $this->total = null;
41
42
        return $this;
43
    }
44
45
46
    /**
47
     * @return bool
48
     */
49
    public function hasTotal()
50
    {
51
        return ($this->total !== null && $this->total !== []);
52
    }
53
54
55
    /**
56
     * @return array
57
     */
58
    protected function getElements(): array
59
    {
60
        return array (
61
          'total' =>
62
          array (
63
            'name' => 'total',
64
            'allownull' => true,
65
            'default' => '',
66
            'type' => 'int',
67
            'is_collection' => false,
68
            'is_dataprovider' => false,
69
            'isCamelCase' => false,
70
          ),
71
        );
72
    }
73
}
74