Skip to content

Commit fef8f94

Browse files
Moussa Sidibesidibos
authored andcommitted
SDK-603: Add the ability to chain RequestBuilder
1 parent 5ad19cb commit fef8f94

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

sandbox/src/Entity/SandboxAgeVerification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class SandboxAgeVerification extends SandboxAttribute
99
const AGE_OVER_FORMAT = 'age_over:%d';
1010
const AGE_UNDER_FORMAT = 'age_under:%d';
1111

12-
public function __construct(\DateTime $dateObj, $derivation, array $anchors = [])
12+
public function __construct(\DateTime $dateObj, $derivation = '', array $anchors = [])
1313
{
1414
parent::__construct(
1515
Profile::ATTR_DATE_OF_BIRTH,

sandbox/src/Http/RequestBuilder.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class RequestBuilder
2424
public function setRememberMeId($value)
2525
{
2626
$this->rememberMeId = $value;
27+
return $this;
2728
}
2829

2930
public function setFullName($value, $optional = 'false', array $anchors = [])
@@ -35,6 +36,7 @@ public function setFullName($value, $optional = 'false', array $anchors = [])
3536
$optional,
3637
$anchors
3738
));
39+
return $this;
3840
}
3941

4042
public function setFamilyName($value, $optional = 'false', array $anchors = [])
@@ -46,6 +48,7 @@ public function setFamilyName($value, $optional = 'false', array $anchors = [])
4648
$optional,
4749
$anchors
4850
));
51+
return $this;
4952
}
5053

5154
public function setGivenNames($value, $optional = 'false', array $anchors = [])
@@ -57,6 +60,7 @@ public function setGivenNames($value, $optional = 'false', array $anchors = [])
5760
$optional,
5861
$anchors
5962
));
63+
return $this;
6064
}
6165

6266
public function setDateOfBirth(\DateTime $dateTime, $optional = 'false', array $anchors = [])
@@ -68,6 +72,7 @@ public function setDateOfBirth(\DateTime $dateTime, $optional = 'false', array $
6872
$optional,
6973
$anchors
7074
));
75+
return $this;
7176
}
7277

7378
public function setGender($value, $optional = 'false', array $anchors = [])
@@ -79,6 +84,7 @@ public function setGender($value, $optional = 'false', array $anchors = [])
7984
$optional,
8085
$anchors
8186
));
87+
return $this;
8288
}
8389

8490
public function setNationality($value, $optional = 'false', array $anchors = [])
@@ -90,6 +96,7 @@ public function setNationality($value, $optional = 'false', array $anchors = [])
9096
$optional,
9197
$anchors
9298
));
99+
return $this;
93100
}
94101

95102
public function setPhoneNumber($value, $optional = 'false', array $anchors = [])
@@ -101,12 +108,13 @@ public function setPhoneNumber($value, $optional = 'false', array $anchors = [])
101108
$optional,
102109
$anchors
103110
));
111+
return $this;
104112
}
105113

106114
public function setSelfie($value, $optional = 'false', array $anchors = [])
107115
{
108116
$base64Selfie = base64_encode($value);
109-
$this->setBase64Selfie($base64Selfie, $optional, $anchors);
117+
return $this->setBase64Selfie($base64Selfie, $optional, $anchors);
110118
}
111119

112120
public function setBase64Selfie($value, $optional = 'true', array $anchors = [])
@@ -118,6 +126,7 @@ public function setBase64Selfie($value, $optional = 'true', array $anchors = [])
118126
$optional,
119127
$anchors
120128
));
129+
return $this;
121130
}
122131

123132
public function setEmailAddress($value, $optional = 'false', array $anchors = [])
@@ -129,6 +138,7 @@ public function setEmailAddress($value, $optional = 'false', array $anchors = []
129138
$optional,
130139
$anchors
131140
));
141+
return $this;
132142
}
133143

134144
public function setPostalAddress($value, $optional = 'false', array $anchors = [])
@@ -140,6 +150,7 @@ public function setPostalAddress($value, $optional = 'false', array $anchors = [
140150
$optional,
141151
$anchors
142152
));
153+
return $this;
143154
}
144155

145156
public function setStructuredPostalAddress($value, $optional = 'false', array $anchors = [])
@@ -151,6 +162,7 @@ public function setStructuredPostalAddress($value, $optional = 'false', array $a
151162
$optional,
152163
$anchors
153164
));
165+
return $this;
154166
}
155167

156168
public function setDocumentDetails($value, $optional = 'true', array $anchors = [])
@@ -162,11 +174,13 @@ public function setDocumentDetails($value, $optional = 'true', array $anchors =
162174
$optional,
163175
$anchors
164176
));
177+
return $this;
165178
}
166179

167180
public function setAgeVerification(SandboxAgeVerification $ageVerification)
168181
{
169182
$this->addAttribute($ageVerification);
183+
return $this;
170184
}
171185

172186
private function addAttribute(SandboxAttribute $attribute)

0 commit comments

Comments
 (0)