You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any reason that the withLeadingSlash, withoutLeadingSlash, withTrailingSlash, withoutTrailingSlash and withoutDotSegments have a return type of PathInterface and not SegmentedPathInterface on the HierarchicalPath class?
This currently causes an issue with intellisense where the order of chaining methods matters. For example, in VSCode using the PHP Intellephense plugin the following code is highlighted as an error (assuming $path is an instance of HierarchicalPath)
If I change the return type in the class methods from PathInterface to SegmentedPathInterface then both work as expected with intellisense and are not highlighted as errors. Also, the change does not cause any of the current PhpUnit test suite to fail.
The text was updated successfully, but these errors were encountered:
Question
Is there any reason that the
withLeadingSlash
,withoutLeadingSlash
,withTrailingSlash
,withoutTrailingSlash
andwithoutDotSegments
have a return type ofPathInterface
and notSegmentedPathInterface
on theHierarchicalPath
class?This currently causes an issue with intellisense where the order of chaining methods matters. For example, in VSCode using the PHP Intellephense plugin the following code is highlighted as an error (assuming
$path
is an instance ofHierarchicalPath
)Whereas if I was to swap the methods to:
Then the code would be highlighted as correct.
If I change the return type in the class methods from
PathInterface
toSegmentedPathInterface
then both work as expected with intellisense and are not highlighted as errors. Also, the change does not cause any of the current PhpUnit test suite to fail.The text was updated successfully, but these errors were encountered: