@@ -82,7 +82,7 @@ public function aProviderIsRegisteredWithCacheDisabled()
82
82
*/
83
83
public function aBooleanFlagWithKeyIsEvaluatedWithDefaultValue (string $ flagKey , bool $ defaultValue )
84
84
{
85
- $ this ->flagType = FlagValueType::BOOLEAN ;
85
+ $ this ->flagType = FlagValueType::Boolean ;
86
86
$ this ->inputFlagKey = $ flagKey ;
87
87
$ this ->inputFlagDefaultValue = $ defaultValue ;
88
88
}
@@ -103,7 +103,7 @@ public function theResolvedBooleanValueShouldBe(bool $resolvedValue)
103
103
*/
104
104
public function aStringFlagWithKeyIsEvaluatedWithDefaultValue (string $ flagKey , string $ defaultValue )
105
105
{
106
- $ this ->flagType = FlagValueType::STRING ;
106
+ $ this ->flagType = FlagValueType::String ;
107
107
$ this ->inputFlagKey = $ flagKey ;
108
108
$ this ->inputFlagDefaultValue = $ defaultValue ;
109
109
}
@@ -124,7 +124,7 @@ public function theResolvedStringValueShouldBe(string $resolvedValue)
124
124
*/
125
125
public function anIntegerFlagWithKeyIsEvaluatedWithDefaultValue (string $ flagKey , int $ defaultValue )
126
126
{
127
- $ this ->flagType = FlagValueType::INTEGER ;
127
+ $ this ->flagType = FlagValueType::Integer ;
128
128
$ this ->inputFlagKey = $ flagKey ;
129
129
$ this ->inputFlagDefaultValue = $ defaultValue ;
130
130
print_r ("Setting integer... \n" );
@@ -146,7 +146,7 @@ public function theResolvedIntegerValueShouldBe(int $resolvedValue)
146
146
*/
147
147
public function aFloatFlagWithKeyIsEvaluatedWithDefaultValue (string $ flagKey , float $ defaultValue )
148
148
{
149
- $ this ->flagType = FlagValueType::FLOAT ;
149
+ $ this ->flagType = FlagValueType::Float ;
150
150
$ this ->inputFlagKey = $ flagKey ;
151
151
$ this ->inputFlagDefaultValue = $ defaultValue ;
152
152
}
@@ -167,7 +167,7 @@ public function theResolvedFloatValueShouldBe(float $resolvedValue)
167
167
*/
168
168
public function anObjectFlagWithKeyIsEvaluatedWithANullDefaultValue (string $ flagKey , mixed $ defaultValue )
169
169
{
170
- $ this ->flagType = FlagValueType::OBJECT ;
170
+ $ this ->flagType = FlagValueType::Object ;
171
171
$ this ->inputFlagKey = $ flagKey ;
172
172
$ this ->inputFlagDefaultValue = $ defaultValue ;
173
173
}
@@ -192,7 +192,7 @@ public function theResolvedObjectValueShouldBeContainFieldsAndWithValuesAndRespe
192
192
*/
193
193
public function aBooleanFlagWithKeyIsEvaluatedWithDetailsAndDefaultValue (string $ flagKey , bool $ defaultValue )
194
194
{
195
- $ this ->flagType = FlagValueType::BOOLEAN ;
195
+ $ this ->flagType = FlagValueType::Boolean ;
196
196
$ this ->inputFlagKey = $ flagKey ;
197
197
$ this ->inputFlagDefaultValue = $ defaultValue ;
198
198
}
@@ -214,7 +214,7 @@ public function theResolvedBooleanDetailsValueShouldBeTheVariantShouldBeAndTheRe
214
214
*/
215
215
public function aStringFlagWithKeyIsEvaluatedWithDetailsAndDefaultValue (string $ flagKey , string $ defaultValue )
216
216
{
217
- $ this ->flagType = FlagValueType::STRING ;
217
+ $ this ->flagType = FlagValueType::String ;
218
218
$ this ->inputFlagKey = $ flagKey ;
219
219
$ this ->inputFlagDefaultValue = $ defaultValue ;
220
220
}
@@ -236,7 +236,7 @@ public function theResolvedStringDetailsValueShouldBeTheVariantShouldBeAndTheRea
236
236
*/
237
237
public function anIntegerFlagWithKeyIsEvaluatedWithDetailsAndDefaultValue (string $ flagKey , int $ defaultValue )
238
238
{
239
- $ this ->flagType = FlagValueType::INTEGER ;
239
+ $ this ->flagType = FlagValueType::Integer ;
240
240
$ this ->inputFlagKey = $ flagKey ;
241
241
$ this ->inputFlagDefaultValue = $ defaultValue ;
242
242
}
@@ -258,7 +258,7 @@ public function theResolvedIntegerDetailsValueShouldBeTheVariantShouldBeAndTheRe
258
258
*/
259
259
public function aFloatFlagWithKeyIsEvaluatedWithDetailsAndDefaultValue (string $ flagKey , float $ defaultValue )
260
260
{
261
- $ this ->flagType = FlagValueType::FLOAT ;
261
+ $ this ->flagType = FlagValueType::Float ;
262
262
$ this ->inputFlagKey = $ flagKey ;
263
263
$ this ->inputFlagDefaultValue = $ defaultValue ;
264
264
}
@@ -280,7 +280,7 @@ public function theResolvedFloatDetailsValueShouldBeTheVariantShouldBeAndTheReas
280
280
*/
281
281
public function anObjectFlagWithKeyIsEvaluatedWithDetailsAndANullDefaultValue (string $ flagKey , mixed $ defaultValue )
282
282
{
283
- $ this ->flagType = FlagValueType::OBJECT ;
283
+ $ this ->flagType = FlagValueType::Object ;
284
284
$ this ->inputFlagKey = $ flagKey ;
285
285
$ this ->inputFlagDefaultValue = $ defaultValue ;
286
286
}
@@ -409,7 +409,7 @@ public function theReasonShouldIndicateAnErrorAndTheErrorCodeShouldIndicateAMiss
409
409
*/
410
410
public function aStringFlagWithKeyIsEvaluatedAsAnIntegerWithDetailsAndADefaultValue (string $ flagKey , int $ defaultValue )
411
411
{
412
- $ this ->flagType = FlagValueType::INTEGER ;
412
+ $ this ->flagType = FlagValueType::Integer ;
413
413
$ this ->inputFlagKey = $ flagKey ;
414
414
$ this ->inputFlagDefaultValue = $ defaultValue ;
415
415
}
@@ -447,23 +447,23 @@ private function calculateValue()
447
447
{
448
448
$ value = null ;
449
449
switch ($ this ->flagType ) {
450
- case FlagValueType::BOOLEAN :
450
+ case FlagValueType::Boolean :
451
451
$ value = $ this ->client ->getBooleanValue ($ this ->inputFlagKey , $ this ->inputFlagDefaultValue , $ this ->inputContext , $ this ->inputOptions );
452
452
453
453
break ;
454
- case FlagValueType::FLOAT :
454
+ case FlagValueType::Float :
455
455
$ value = $ this ->client ->getFloatValue ($ this ->inputFlagKey , $ this ->inputFlagDefaultValue , $ this ->inputContext , $ this ->inputOptions );
456
456
457
457
break ;
458
- case FlagValueType::INTEGER :
458
+ case FlagValueType::Integer :
459
459
$ value = $ this ->client ->getIntegerValue ($ this ->inputFlagKey , $ this ->inputFlagDefaultValue , $ this ->inputContext , $ this ->inputOptions );
460
460
461
461
break ;
462
- case FlagValueType::OBJECT :
462
+ case FlagValueType::Object :
463
463
$ value = $ this ->client ->getObjectValue ($ this ->inputFlagKey , $ this ->inputFlagDefaultValue , $ this ->inputContext , $ this ->inputOptions );
464
464
465
465
break ;
466
- case FlagValueType::STRING :
466
+ case FlagValueType::String :
467
467
$ value = $ this ->client ->getStringValue ($ this ->inputFlagKey , $ this ->inputFlagDefaultValue , $ this ->inputContext , $ this ->inputOptions );
468
468
469
469
break ;
@@ -479,23 +479,23 @@ private function calculateDetails(): EvaluationDetails
479
479
{
480
480
$ details = null ;
481
481
switch ($ this ->flagType ) {
482
- case FlagValueType::BOOLEAN :
482
+ case FlagValueType::Boolean :
483
483
$ details = $ this ->client ->getBooleanDetails ($ this ->inputFlagKey , $ this ->inputFlagDefaultValue , $ this ->inputContext , $ this ->inputOptions );
484
484
485
485
break ;
486
- case FlagValueType::FLOAT :
486
+ case FlagValueType::Float :
487
487
$ details = $ this ->client ->getFloatDetails ($ this ->inputFlagKey , $ this ->inputFlagDefaultValue , $ this ->inputContext , $ this ->inputOptions );
488
488
489
489
break ;
490
- case FlagValueType::INTEGER :
490
+ case FlagValueType::Integer :
491
491
$ details = $ this ->client ->getIntegerDetails ($ this ->inputFlagKey , $ this ->inputFlagDefaultValue , $ this ->inputContext , $ this ->inputOptions );
492
492
493
493
break ;
494
- case FlagValueType::OBJECT :
494
+ case FlagValueType::Object :
495
495
$ details = $ this ->client ->getObjectDetails ($ this ->inputFlagKey , $ this ->inputFlagDefaultValue , $ this ->inputContext , $ this ->inputOptions );
496
496
497
497
break ;
498
- case FlagValueType::STRING :
498
+ case FlagValueType::String :
499
499
$ details = $ this ->client ->getStringDetails ($ this ->inputFlagKey , $ this ->inputFlagDefaultValue , $ this ->inputContext , $ this ->inputOptions );
500
500
501
501
break ;
@@ -518,23 +518,23 @@ private function setFlagTypeIfNullByValue(mixed $value): void
518
518
private function getFlagTypeOf (mixed $ value ): ?string
519
519
{
520
520
if (is_string ($ value )) {
521
- return FlagValueType::STRING ;
521
+ return FlagValueType::String ;
522
522
}
523
523
524
524
if (is_array ($ value )) {
525
- return FlagValueType::OBJECT ;
525
+ return FlagValueType::Object ;
526
526
}
527
527
528
528
if (is_float ($ value )) {
529
- return FlagValueType::FLOAT ;
529
+ return FlagValueType::Float ;
530
530
}
531
531
532
532
if (is_int ($ value )) {
533
- return FlagValueType::INTEGER ;
533
+ return FlagValueType::Integer ;
534
534
}
535
535
536
536
if (is_bool ($ value )) {
537
- return FlagValueType::BOOLEAN ;
537
+ return FlagValueType::Boolean ;
538
538
}
539
539
}
540
540
0 commit comments