SubscriptionModel   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 96
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 1
dl 0
loc 96
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
A setType() 0 6 1
A getPaid() 0 4 1
A setPaid() 0 6 1
A getUserLimit() 0 4 1
A setUserLimit() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the zibios/wrike-php-jmsserializer package.
5
 *
6
 * (c) Zbigniew Ślązak
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 Zibios\WrikePhpJmsserializer\Model\Common;
13
14
use JMS\Serializer\Annotation as SA;
15
use Zibios\WrikePhpJmsserializer\Model\AbstractModel;
16
use Zibios\WrikePhpJmsserializer\Model\ResourceModelInterface;
17
18
/**
19
 * Subscription Model.
20
 */
21
class SubscriptionModel extends AbstractModel implements ResourceModelInterface
22
{
23
    /**
24
     * Subscription type.
25
     *
26
     * Enum: Free, Premium, Business, CreativeBusiness, Enterprise, CreativeEnterprise
27
     *
28
     * @see \Zibios\WrikePhpLibrary\Enum\SubscriptionTypeEnum
29
     *
30
     * @SA\Type("string")
31
     * @SA\SerializedName("type")
32
     *
33
     * @var string|null
34
     */
35
    protected $type;
36
37
    /**
38
     * Subscription is paid (available only to account admins).
39
     *
40
     * @SA\Type("boolean")
41
     * @SA\SerializedName("paid")
42
     *
43
     * @var bool|null
44
     */
45
    protected $paid;
46
47
    /**
48
     * Limit of subscription users (available only to account admins).
49
     *
50
     * @SA\Type("integer")
51
     * @SA\SerializedName("userLimit")
52
     *
53
     * @var int|null
54
     */
55
    protected $userLimit;
56
57
    /**
58
     * @return null|string
59
     */
60 1
    public function getType()
61
    {
62 1
        return $this->type;
63
    }
64
65
    /**
66
     * @param null|string $type
67
     *
68
     * @return $this
69
     */
70 1
    public function setType($type)
71
    {
72 1
        $this->type = $type;
73
74 1
        return $this;
75
    }
76
77
    /**
78
     * @return bool|null
79
     */
80 1
    public function getPaid()
81
    {
82 1
        return $this->paid;
83
    }
84
85
    /**
86
     * @param bool|null $paid
87
     *
88
     * @return $this
89
     */
90 1
    public function setPaid($paid)
91
    {
92 1
        $this->paid = $paid;
93
94 1
        return $this;
95
    }
96
97
    /**
98
     * @return int|null
99
     */
100 1
    public function getUserLimit()
101
    {
102 1
        return $this->userLimit;
103
    }
104
105
    /**
106
     * @param int|null $userLimit
107
     *
108
     * @return $this
109
     */
110 1
    public function setUserLimit($userLimit)
111
    {
112 1
        $this->userLimit = $userLimit;
113
114 1
        return $this;
115
    }
116
}
117