File tree Expand file tree Collapse file tree 4 files changed +15
-15
lines changed
Expand file tree Collapse file tree 4 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public static function getEnvironmentFeatureState(
6363 public static function getIdentityFeatureStates (
6464 EnvironmentModel $ environment ,
6565 IdentityModel $ identity ,
66- array $ overrideTraits = null
66+ ? array $ overrideTraits = null
6767 ): array {
6868 $ featureStates = self ::_getIdentityFeatureStatesDict (
6969 $ environment ,
@@ -96,7 +96,7 @@ public static function getIdentityFeatureState(
9696 EnvironmentModel $ environment ,
9797 IdentityModel $ identity ,
9898 string $ featureName ,
99- array $ overrideTraits = null
99+ ? array $ overrideTraits = null
100100 ): FeatureStateModel {
101101 $ featureStates = self ::_getIdentityFeatureStatesDict (
102102 $ environment ,
@@ -128,7 +128,7 @@ public static function getIdentityFeatureState(
128128 private static function _getIdentityFeatureStatesDict (
129129 EnvironmentModel $ environment ,
130130 IdentityModel $ identity ,
131- array $ overrideTraits = null
131+ ? array $ overrideTraits = null
132132 ): array {
133133 $ featureStates = [];
134134 foreach ($ environment ->getFeatureStates () as $ fs ) {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class SegmentEvaluator
2020 public static function getIdentitySegments (
2121 EnvironmentModel $ environment ,
2222 IdentityModel $ identity ,
23- array $ overrideTraits = null
23+ ? array $ overrideTraits = null
2424 ): array {
2525 return array_filter (
2626 $ environment ->getProject ()->getSegments ()->getArrayCopy (),
@@ -42,7 +42,7 @@ public static function getIdentitySegments(
4242 public static function evaluateIdentityInSegment (
4343 IdentityModel $ identity ,
4444 SegmentModel $ segment ,
45- array $ overrideTraits = null
45+ ? array $ overrideTraits = null
4646 ): bool {
4747 $ rulesCount = count ($ segment ->getRules ());
4848 $ identityId = ($ identity ->getDjangoId () != null ) ? $ identity ->getDjangoId () : $ identity ->compositeKey ();
Original file line number Diff line number Diff line change @@ -60,15 +60,15 @@ class Flagsmith
6060 * @throws ValueError
6161 */
6262 public function __construct (
63- string $ apiKey = null ,
64- string $ host = null ,
65- object $ customHeaders = null ,
66- int $ environmentTtl = null ,
67- Retry $ retries = null ,
63+ ? string $ apiKey = null ,
64+ ? string $ host = null ,
65+ ? object $ customHeaders = null ,
66+ ? int $ environmentTtl = null ,
67+ ? Retry $ retries = null ,
6868 bool $ enableAnalytics = false ,
69- \Closure $ defaultFlagHandler = null ,
69+ ? \Closure $ defaultFlagHandler = null ,
7070 bool $ offlineMode = false ,
71- IOfflineHandler $ offlineHandler = null
71+ ? IOfflineHandler $ offlineHandler = null
7272 ) {
7373 if ($ offlineMode and is_null ($ offlineHandler )) {
7474 throw new ValueError ('offlineHandler must be provided to use offline mode. ' );
Original file line number Diff line number Diff line change @@ -31,9 +31,9 @@ public function __construct(
3131 string $ environmentKey ,
3232 string $ baseApiUrl ,
3333 int $ timeout = 5 ,
34- ClientInterface $ client = null ,
35- RequestFactoryInterface $ requestFactory = null ,
36- StreamFactoryInterface $ streamFactory = null
34+ ? ClientInterface $ client = null ,
35+ ? RequestFactoryInterface $ requestFactory = null ,
36+ ? StreamFactoryInterface $ streamFactory = null
3737 ) {
3838 $ this ->analytics_endpoint = rtrim ($ baseApiUrl , '/ ' ) . self ::ANALYTICS_ENDPOINT ;
3939 $ this ->environment_key = $ environmentKey ;
You can’t perform that action at this time.
0 commit comments