Total Complexity | 5 |
Total Lines | 70 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
19 | class StickerTemplate extends AbstractTemplate |
||
20 | { |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | public $packageId; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | public $stickerId; |
||
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | public function getTemplate() |
||
35 | { |
||
36 | return new StickerMessageBuilder($this->packageId, $this->stickerId); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param int $stickerId |
||
41 | * @return StickerTemplate |
||
42 | */ |
||
43 | public static function createMoon($stickerId) |
||
44 | { |
||
45 | $self = new self(); |
||
46 | $self->packageId = 1; |
||
47 | $self->stickerId = $stickerId; |
||
48 | |||
49 | return $self; |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @param int $stickerId |
||
54 | * @return StickerTemplate |
||
55 | */ |
||
56 | public static function createBrown($stickerId) |
||
57 | { |
||
58 | $self = new self(); |
||
59 | $self->packageId = 2; |
||
60 | $self->stickerId = $stickerId; |
||
61 | |||
62 | return $self; |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * @param int $stickerId |
||
67 | * @return StickerTemplate |
||
68 | */ |
||
69 | public static function createCherry($stickerId) |
||
70 | { |
||
71 | $self = new self(); |
||
72 | $self->packageId = 3; |
||
73 | $self->stickerId = $stickerId; |
||
74 | |||
75 | return $self; |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * @param int $stickerId |
||
80 | * @return StickerTemplate |
||
81 | */ |
||
82 | public static function createDaily($stickerId) |
||
89 | } |
||
90 | } |
||
91 |