This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /* |
||
3 | * This file is part of the FirebaseCloudMessagingBundle. |
||
4 | * |
||
5 | * (c) Artem Henvald <[email protected]> |
||
6 | * |
||
7 | * For the full copyright and license information, please view the LICENSE |
||
8 | * file that was distributed with this source code. |
||
9 | */ |
||
10 | |||
11 | declare(strict_types=1); |
||
12 | |||
13 | namespace Fresh\FirebaseCloudMessagingBundle\Message\Part\Options; |
||
14 | |||
15 | /** |
||
16 | * Class Options. |
||
17 | * |
||
18 | * Set of options that can be used to change default behaviour of FCM notification. |
||
19 | * |
||
20 | * @author Artem Henvald <[email protected]> |
||
21 | */ |
||
22 | final class Options implements OptionsInterface |
||
23 | { |
||
24 | /** |
||
25 | * Default `time_to_live` option value is 4 weeks (it is also the maximum TTL allowed for FCM). |
||
26 | * In seconds it is 60 seconds * 60 minutes * 24 hours * 28 days = 2419200 seconds. |
||
27 | */ |
||
28 | public const DEFAULT_TTL_IN_SECONDS = 2419200; |
||
29 | |||
30 | private string $collapseKey = ''; |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
31 | |||
32 | private string $priority = Priority::NORMAL; |
||
33 | |||
34 | private bool $contentAvailable = false; |
||
35 | |||
36 | private bool $mutableContent = false; |
||
37 | |||
38 | private int $timeToLive = self::DEFAULT_TTL_IN_SECONDS; |
||
39 | |||
40 | private string $restrictedPackageName = ''; |
||
41 | |||
42 | private bool $dryRun = false; |
||
43 | |||
44 | /** |
||
45 | * @param string $collapseKey |
||
46 | * |
||
47 | * @return $this |
||
48 | */ |
||
49 | public function setCollapseKey(string $collapseKey): self |
||
50 | { |
||
51 | $this->collapseKey = $collapseKey; |
||
52 | |||
53 | return $this; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function getCollapseKey(): string |
||
60 | { |
||
61 | return $this->collapseKey; |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @param string $priority |
||
66 | * |
||
67 | * @return $this |
||
68 | */ |
||
69 | public function setPriority(string $priority): self |
||
70 | { |
||
71 | $this->priority = $priority; |
||
72 | |||
73 | return $this; |
||
74 | } |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | public function getPriority(): string |
||
80 | { |
||
81 | return $this->priority; |
||
82 | } |
||
83 | |||
84 | /** |
||
85 | * @param bool $contentAvailable |
||
86 | * |
||
87 | * @return $this |
||
88 | */ |
||
89 | public function setContentAvailable(bool $contentAvailable): self |
||
90 | { |
||
91 | $this->contentAvailable = $contentAvailable; |
||
92 | |||
93 | return $this; |
||
94 | } |
||
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | public function isContentAvailable(): bool |
||
100 | { |
||
101 | return $this->contentAvailable; |
||
102 | } |
||
103 | |||
104 | /** |
||
105 | * @param bool $mutableContent |
||
106 | * |
||
107 | * @return $this |
||
108 | */ |
||
109 | public function setMutableContent(bool $mutableContent): self |
||
110 | { |
||
111 | $this->mutableContent = $mutableContent; |
||
112 | |||
113 | return $this; |
||
114 | } |
||
115 | |||
116 | /** |
||
117 | * {@inheritdoc} |
||
118 | */ |
||
119 | public function isMutableContent(): bool |
||
120 | { |
||
121 | return $this->mutableContent; |
||
122 | } |
||
123 | |||
124 | /** |
||
125 | * @param int $timeToLive |
||
126 | * |
||
127 | * @return $this |
||
128 | */ |
||
129 | public function setTimeToLive(int $timeToLive): self |
||
130 | { |
||
131 | $this->timeToLive = $timeToLive; |
||
132 | |||
133 | return $this; |
||
134 | } |
||
135 | |||
136 | /** |
||
137 | * {@inheritdoc} |
||
138 | */ |
||
139 | public function getTimeToLive(): int |
||
140 | { |
||
141 | return $this->timeToLive; |
||
142 | } |
||
143 | |||
144 | /** |
||
145 | * @param string $restrictedPackageName |
||
146 | * |
||
147 | * @return $this |
||
148 | */ |
||
149 | public function setRestrictedPackageName(string $restrictedPackageName): self |
||
150 | { |
||
151 | $this->restrictedPackageName = $restrictedPackageName; |
||
152 | |||
153 | return $this; |
||
154 | } |
||
155 | |||
156 | /** |
||
157 | * {@inheritdoc} |
||
158 | */ |
||
159 | public function getRestrictedPackageName(): string |
||
160 | { |
||
161 | return $this->restrictedPackageName; |
||
162 | } |
||
163 | |||
164 | /** |
||
165 | * @param bool $dryRun |
||
166 | * |
||
167 | * @return $this |
||
168 | */ |
||
169 | public function setDryRun(bool $dryRun): self |
||
170 | { |
||
171 | $this->dryRun = $dryRun; |
||
172 | |||
173 | return $this; |
||
174 | } |
||
175 | |||
176 | /** |
||
177 | * {@inheritdoc} |
||
178 | */ |
||
179 | public function isDryRun(): bool |
||
180 | { |
||
181 | return $this->dryRun; |
||
182 | } |
||
183 | } |
||
184 |