Skip to content

Commit 3f509c9

Browse files
committed
qa: switch to $varname::class usage instead of get_class($varname)
Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
1 parent a2629ac commit 3f509c9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Authentication/DefaultAuthenticationListener.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use function array_merge;
1818
use function array_unique;
1919
use function count;
20-
use function get_class;
2120
use function gettype;
2221
use function is_object;
2322
use function rtrim;
@@ -231,7 +230,7 @@ private function getTypeFromMap($routeMatch = null)
231230
__METHOD__,
232231
RouteMatch::class,
233232
V2RouteMatch::class,
234-
is_object($routeMatch) ? get_class($routeMatch) : gettype($routeMatch)
233+
is_object($routeMatch) ? $routeMatch::class : gettype($routeMatch)
235234
));
236235
}
237236

src/Authorization/DefaultResourceResolverListener.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Laminas\Stdlib\RequestInterface;
1313

1414
use function array_key_exists;
15-
use function get_class;
1615
use function gettype;
1716
use function is_object;
1817
use function sprintf;
@@ -84,7 +83,7 @@ public function buildResourceString($routeMatch, $request)
8483
__METHOD__,
8584
RouteMatch::class,
8685
V2RouteMatch::class,
87-
is_object($routeMatch) ? get_class($routeMatch) : gettype($routeMatch)
86+
is_object($routeMatch) ? $routeMatch::class : gettype($routeMatch)
8887
));
8988
}
9089

0 commit comments

Comments
 (0)