Skip to content

Commit 2216f8d

Browse files
committed
wip it
1 parent 20c942d commit 2216f8d

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/FeatureFlags.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,17 @@ public static function isEnabled(string $feature): bool
7474
return match (self::getState($feature)) {
7575
FeatureState::on() => true,
7676
FeatureState::off() => false,
77-
FeatureState::dynamic() => call_user_func(function () use ($feature) {
78-
if (array_key_exists($feature, self::$dynamicHandlers)) {
79-
return call_user_func(self::$dynamicHandlers[$feature], $feature, request()) === true;
80-
} elseif (is_callable(self::$defaultDynamicHandler)) {
81-
return call_user_func(self::$defaultDynamicHandler, $feature, request()) === true;
77+
FeatureState::dynamic() => call_user_func(
78+
function () use ($feature) {
79+
if (array_key_exists($feature, self::$dynamicHandlers)) {
80+
return call_user_func(self::$dynamicHandlers[$feature], $feature, request()) === true;
81+
} elseif (is_callable(self::$defaultDynamicHandler)) {
82+
return call_user_func(self::$defaultDynamicHandler, $feature, request()) === true;
83+
}
84+
85+
return false;
8286
}
83-
84-
return false;
85-
}),
87+
),
8688
default => false
8789
};
8890
}

0 commit comments

Comments
 (0)