Skip to content

Commit e224fb2

Browse files
authored
Last namespace separator is not removed
Because the count function was used to determine the length of the FQNN the last character was not correctly determined. This was remedied by replacing the count function with strlen. Fixes #26
1 parent b39c7a5 commit e224fb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Types/Context.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct($namespace, array $namespaceAliases = [])
5151
if ($fqnn[0] === '\\') {
5252
$fqnn = substr($fqnn, 1);
5353
}
54-
if ($fqnn[count($fqnn)-1] === '\\') {
54+
if ($fqnn[strlen($fqnn) - 1] === '\\') {
5555
$fqnn = substr($fqnn, 0, -1);
5656
}
5757

0 commit comments

Comments
 (0)