Skip to content

Commit bbb845c

Browse files
committed
class is stringable
1 parent 9e2aeda commit bbb845c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Util/AutoloaderUtil.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function isNamespaceConfiguredToAutoload(string $namespace): bool
8484
}
8585

8686
foreach ($classLoader->getPrefixes() as $prefix => $paths) {
87-
if (0 === strpos($namespace, $prefix)) {
87+
if (str_starts_with($namespace, $prefix)) {
8888
return true;
8989
}
9090
}

src/Util/ClassNameValue.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* @internal
1818
*/
19-
final class ClassNameValue
19+
final class ClassNameValue implements \Stringable
2020
{
2121
public function __construct(
2222
private string $typeHint,
@@ -38,7 +38,7 @@ public function isSelf(): bool
3838
return 'self' === $this->typeHint;
3939
}
4040

41-
public function __toString()
41+
public function __toString(): string
4242
{
4343
return $this->getShortName();
4444
}

0 commit comments

Comments
 (0)