@@ -127,7 +127,7 @@ public function getMetadata(): MetadataInterface
127127 * with parameters flag key (string, required), default value (boolean | number | string | structure, required),
128128 * evaluation context (optional), and evaluation options (optional), which returns the flag value.
129129 */
130- public function getBooleanValue (string $ flagKey , bool $ defaultValue , ?EvaluationContextInterface $ context , ?EvaluationOptionsInterface $ options ): bool
130+ public function getBooleanValue (string $ flagKey , bool $ defaultValue , ?EvaluationContextInterface $ context = null , ?EvaluationOptionsInterface $ options = null ): bool
131131 {
132132 /** @var bool $value */
133133 $ value = $ this ->getBooleanDetails ($ flagKey , $ defaultValue , $ context , $ options )->getValue () ?? $ defaultValue ;
@@ -143,7 +143,7 @@ public function getBooleanValue(string $flagKey, bool $defaultValue, ?Evaluation
143143 * default value (boolean | number | string | structure, required), evaluation context (optional), and evaluation
144144 * options (optional), which returns an evaluation details structure.
145145 */
146- public function getBooleanDetails (string $ flagKey , bool $ defaultValue , ?EvaluationContextInterface $ context , ?EvaluationOptionsInterface $ options ): EvaluationDetailsInterface
146+ public function getBooleanDetails (string $ flagKey , bool $ defaultValue , ?EvaluationContextInterface $ context = null , ?EvaluationOptionsInterface $ options = null ): EvaluationDetailsInterface
147147 {
148148 return $ this ->evaluateFlag (FlagValueType::BOOLEAN , $ flagKey , $ defaultValue , $ context , $ options );
149149 }
@@ -156,7 +156,7 @@ public function getBooleanDetails(string $flagKey, bool $defaultValue, ?Evaluati
156156 * with parameters flag key (string, required), default value (boolean | number | string | structure, required),
157157 * evaluation context (optional), and evaluation options (optional), which returns the flag value.
158158 */
159- public function getStringValue (string $ flagKey , string $ defaultValue , ?EvaluationContextInterface $ context , ?EvaluationOptionsInterface $ options ): string
159+ public function getStringValue (string $ flagKey , string $ defaultValue , ?EvaluationContextInterface $ context = null , ?EvaluationOptionsInterface $ options = null ): string
160160 {
161161 /** @var string $value */
162162 $ value = $ this ->getStringDetails ($ flagKey , $ defaultValue , $ context , $ options )->getValue () ?? $ defaultValue ;
@@ -172,7 +172,7 @@ public function getStringValue(string $flagKey, string $defaultValue, ?Evaluatio
172172 * default value (boolean | number | string | structure, required), evaluation context (optional), and evaluation
173173 * options (optional), which returns an evaluation details structure.
174174 */
175- public function getStringDetails (string $ flagKey , string $ defaultValue , ?EvaluationContextInterface $ context , ?EvaluationOptionsInterface $ options ): EvaluationDetailsInterface
175+ public function getStringDetails (string $ flagKey , string $ defaultValue , ?EvaluationContextInterface $ context = null , ?EvaluationOptionsInterface $ options = null ): EvaluationDetailsInterface
176176 {
177177 return $ this ->evaluateFlag (FlagValueType::STRING , $ flagKey , $ defaultValue , $ context , $ options );
178178 }
@@ -190,7 +190,7 @@ public function getStringDetails(string $flagKey, string $defaultValue, ?Evaluat
190190 * -----------------
191191 * The client SHOULD provide functions for floating-point numbers and integers, consistent with language idioms.
192192 */
193- public function getIntegerValue (string $ flagKey , int $ defaultValue , ?EvaluationContextInterface $ context , ?EvaluationOptionsInterface $ options ): int
193+ public function getIntegerValue (string $ flagKey , int $ defaultValue , ?EvaluationContextInterface $ context = null , ?EvaluationOptionsInterface $ options = null ): int
194194 {
195195 /** @var int $value */
196196 $ value = $ this ->getIntegerDetails ($ flagKey , $ defaultValue , $ context , $ options )->getValue () ?? $ defaultValue ;
@@ -206,7 +206,7 @@ public function getIntegerValue(string $flagKey, int $defaultValue, ?EvaluationC
206206 * default value (boolean | number | string | structure, required), evaluation context (optional), and evaluation
207207 * options (optional), which returns an evaluation details structure.
208208 */
209- public function getIntegerDetails (string $ flagKey , int $ defaultValue , ?EvaluationContextInterface $ context , ?EvaluationOptionsInterface $ options ): EvaluationDetailsInterface
209+ public function getIntegerDetails (string $ flagKey , int $ defaultValue , ?EvaluationContextInterface $ context = null , ?EvaluationOptionsInterface $ options = null ): EvaluationDetailsInterface
210210 {
211211 return $ this ->evaluateFlag (FlagValueType::INTEGER , $ flagKey , $ defaultValue , $ context , $ options );
212212 }
@@ -224,7 +224,7 @@ public function getIntegerDetails(string $flagKey, int $defaultValue, ?Evaluatio
224224 * -----------------
225225 * The client SHOULD provide functions for floating-point numbers and integers, consistent with language idioms.
226226 */
227- public function getFloatValue (string $ flagKey , float $ defaultValue , ?EvaluationContextInterface $ context , ?EvaluationOptionsInterface $ options ): float
227+ public function getFloatValue (string $ flagKey , float $ defaultValue , ?EvaluationContextInterface $ context = null , ?EvaluationOptionsInterface $ options = null ): float
228228 {
229229 /** @var float $value */
230230 $ value = $ this ->getFloatDetails ($ flagKey , $ defaultValue , $ context , $ options )->getValue () ?? $ defaultValue ;
@@ -240,7 +240,7 @@ public function getFloatValue(string $flagKey, float $defaultValue, ?EvaluationC
240240 * default value (boolean | number | string | structure, required), evaluation context (optional), and evaluation
241241 * options (optional), which returns an evaluation details structure.
242242 */
243- public function getFloatDetails (string $ flagKey , float $ defaultValue , ?EvaluationContextInterface $ context , ?EvaluationOptionsInterface $ options ): EvaluationDetailsInterface
243+ public function getFloatDetails (string $ flagKey , float $ defaultValue , ?EvaluationContextInterface $ context = null , ?EvaluationOptionsInterface $ options = null ): EvaluationDetailsInterface
244244 {
245245 return $ this ->evaluateFlag (FlagValueType::FLOAT , $ flagKey , $ defaultValue , $ context , $ options );
246246 }
@@ -255,7 +255,7 @@ public function getFloatDetails(string $flagKey, float $defaultValue, ?Evaluatio
255255 *
256256 * @inheritdoc
257257 */
258- public function getObjectValue (string $ flagKey , $ defaultValue , ?EvaluationContextInterface $ context , ?EvaluationOptionsInterface $ options )
258+ public function getObjectValue (string $ flagKey , $ defaultValue , ?EvaluationContextInterface $ context = null , ?EvaluationOptionsInterface $ options = null )
259259 {
260260 /** @var mixed[] $value */
261261 $ value = $ this ->getObjectDetails ($ flagKey , $ defaultValue , $ context , $ options )->getValue () ?? $ defaultValue ;
@@ -275,7 +275,7 @@ public function getObjectValue(string $flagKey, $defaultValue, ?EvaluationContex
275275 *
276276 * @inheritdoc
277277 */
278- public function getObjectDetails (string $ flagKey , $ defaultValue , ?EvaluationContextInterface $ context , ?EvaluationOptionsInterface $ options ): EvaluationDetailsInterface
278+ public function getObjectDetails (string $ flagKey , $ defaultValue , ?EvaluationContextInterface $ context = null , ?EvaluationOptionsInterface $ options = null ): EvaluationDetailsInterface
279279 {
280280 return $ this ->evaluateFlag (FlagValueType::OBJECT , $ flagKey , $ defaultValue , $ context , $ options );
281281 }
0 commit comments