Skip to content

Commit

Permalink
Simplify method logic
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Apr 11, 2024
1 parent e30c337 commit 88e9866
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Hyde\Framework\Concerns\Internal;

use Hyde\Enums\Feature;
use Illuminate\Support\Str;

/**
Expand All @@ -23,12 +22,8 @@ public static function mock(string $feature, bool $enabled): void
static::$mockedInstances[Str::studly($feature)] = $enabled;
}

public static function resolveMockedInstance(Feature|string $feature): ?bool
public static function resolveMockedInstance(string $feature): ?bool
{
if ($feature instanceof Feature) {
$feature = $feature->name;
}

return static::$mockedInstances[Str::studly($feature)] ?? null;
}

Expand Down

0 comments on commit 88e9866

Please sign in to comment.