Skip to content

Commit bac6ebc

Browse files
authored
Remove superfluous code, push change to default sender ID (#453)
1 parent 915a62f commit bac6ebc

File tree

1 file changed

+8
-56
lines changed

1 file changed

+8
-56
lines changed

src/Verify/Request.php

Lines changed: 8 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class Request implements ArrayHydrateInterface
2121
{
2222
public const PIN_LENGTH_4 = 4;
2323
public const PIN_LENGTH_6 = 6;
24-
2524
public const WORKFLOW_SMS_TTS_TSS = 1;
2625
public const WORKFLOW_SMS_SMS_TSS = 2;
2726
public const WORKFLOW_TTS_TSS = 3;
@@ -30,40 +29,14 @@ class Request implements ArrayHydrateInterface
3029
public const WORKFLOW_SMS = 6;
3130
public const WORKFLOW_TTS = 7;
3231

33-
/**
34-
* @var string
35-
*/
36-
protected $country;
37-
38-
/**
39-
* @var string
40-
*/
41-
protected $senderId = 'VERIFY';
42-
43-
/**
44-
* @var int
45-
*/
46-
protected $codeLength = 4;
47-
48-
/**
49-
* @var string
50-
*/
51-
protected $locale;
52-
53-
/**
54-
* @var int
55-
*/
56-
protected $pinExpiry = 300;
57-
58-
/**
59-
* @var int
60-
*/
61-
protected $nextEventWait = 300;
62-
63-
/**
64-
* @var int
65-
*/
66-
protected $workflowId = 1;
32+
protected string $country = '';
33+
protected string $senderId = 'VONAGE';
34+
protected int $codeLength = 4;
35+
36+
protected string $locale = '';
37+
protected int $pinExpiry = 300;
38+
protected int $nextEventWait = 300;
39+
protected int $workflowId = 1;
6740

6841
public function __construct(protected string $number, protected string $brand, int $workflowId = 1)
6942
{
@@ -75,9 +48,6 @@ public function getCountry(): ?string
7548
return $this->country;
7649
}
7750

78-
/**
79-
* @return $this
80-
*/
8151
public function setCountry(string $country): self
8252
{
8353
if (strlen($country) !== 2) {
@@ -94,9 +64,6 @@ public function getSenderId(): string
9464
return $this->senderId;
9565
}
9666

97-
/**
98-
* @return $this
99-
*/
10067
public function setSenderId(string $senderId): self
10168
{
10269
$this->senderId = $senderId;
@@ -109,9 +76,6 @@ public function getCodeLength(): int
10976
return $this->codeLength;
11077
}
11178

112-
/**
113-
* @return $this
114-
*/
11579
public function setCodeLength(int $codeLength): self
11680
{
11781
if ($codeLength !== self::PIN_LENGTH_4 && $codeLength !== self::PIN_LENGTH_6) {
@@ -130,9 +94,6 @@ public function getLocale(): ?string
13094
return $this->locale;
13195
}
13296

133-
/**
134-
* @return $this
135-
*/
13697
public function setLocale(string $locale): self
13798
{
13899
$this->locale = $locale;
@@ -145,9 +106,6 @@ public function getPinExpiry(): int
145106
return $this->pinExpiry;
146107
}
147108

148-
/**
149-
* @return $this
150-
*/
151109
public function setPinExpiry(int $pinExpiry): self
152110
{
153111
if ($pinExpiry < 60 || $pinExpiry > 3600) {
@@ -164,9 +122,6 @@ public function getNextEventWait(): int
164122
return $this->nextEventWait;
165123
}
166124

167-
/**
168-
* @return $this
169-
*/
170125
public function setNextEventWait(int $nextEventWait): self
171126
{
172127
if ($nextEventWait < 60 || $nextEventWait > 3600) {
@@ -183,9 +138,6 @@ public function getWorkflowId(): int
183138
return $this->workflowId;
184139
}
185140

186-
/**
187-
* @return $this
188-
*/
189141
public function setWorkflowId(int $workflowId): self
190142
{
191143
if ($workflowId < 1 || $workflowId > 7) {

0 commit comments

Comments
 (0)