Skip to content

Commit d27a416

Browse files
committed
Invert 'if' statement
1 parent a1fecf2 commit d27a416

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/framework/src/Facades/Features.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@ protected function getConfiguredFeatures(): array
164164
public static function mock(string|array $feature, bool $enabled = null): void
165165
{
166166
foreach (is_array($feature) ? $feature : [$feature => $enabled] as $feature => $enabled) {
167-
if ($enabled !== true) {
168-
Hyde::features()->features = array_filter(Hyde::features()->features, fn (string $search): bool => $search !== $feature);
169-
} else {
167+
if ($enabled === true) {
170168
Hyde::features()->features[] = $feature;
169+
} else {
170+
Hyde::features()->features = array_filter(Hyde::features()->features, fn (string $search): bool => $search !== $feature);
171171
}
172172
}
173173
}

0 commit comments

Comments
 (0)