Skip to content

Commit e1cf340

Browse files
committed
minor #47401 Replace get_class() calls by ::class (deguif)
This PR was squashed before being merged into the 6.2 branch. Discussion ---------- Replace get_class() calls by ::class | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Replace `get_class()` by `::class` Commits ------- 675601b8f7 Replace get_class() calls by ::class
2 parents ab2b2b0 + fd8044a commit e1cf340

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Requirement/EnumRequirement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(string|array $cases = [])
3838
throw new InvalidArgumentException(sprintf('Case must be a "BackedEnum" instance, "%s" given.', get_debug_type($case)));
3939
}
4040

41-
$class ??= \get_class($case);
41+
$class ??= $case::class;
4242

4343
if (!$case instanceof $class) {
4444
throw new InvalidArgumentException(sprintf('"%s::%s" is not a case of "%s".', get_debug_type($case), $case->name, $class));

0 commit comments

Comments
 (0)