Skip to content

Commit

Permalink
class is stringable
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow committed May 24, 2022
1 parent f2c8985 commit 18d1bc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Util/AutoloaderUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function isNamespaceConfiguredToAutoload(string $namespace): bool
}

foreach ($classLoader->getPrefixes() as $prefix => $paths) {
if (0 === strpos($namespace, $prefix)) {
if (str_starts_with($namespace, $prefix)) {
return true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Util/ClassNameValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @internal
*/
final class ClassNameValue
final class ClassNameValue implements \Stringable
{
public function __construct(
private string $typeHint,
Expand All @@ -38,7 +38,7 @@ public function isSelf(): bool
return 'self' === $this->typeHint;
}

public function __toString()
public function __toString(): string
{
return $this->getShortName();
}
Expand Down

0 comments on commit 18d1bc8

Please sign in to comment.