Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change return type to more specific implementation #2383

Closed
snapshotpl opened this issue Dec 3, 2019 · 0 comments · Fixed by #2396 or #2395
Closed

Change return type to more specific implementation #2383

snapshotpl opened this issue Dec 3, 2019 · 0 comments · Fixed by #2396 or #2395
Labels

Comments

@snapshotpl
Copy link
Contributor


    ---------- begin diff ----------
--- Original
+++ New
@@ -45,7 +45,7 @@
     /**
      * @param string|UriInterface|int|null $value
      */
-    public function convertToPHPValue($value, AbstractPlatform $platform): ?UriInterface
+    public function convertToPHPValue($value, AbstractPlatform $platform): ?UriImplementation
     {
         if (\is_string($value)) {
             return new UriImplementation($value);
    ----------- end diff -----------
Applied rules:
 * Rector\TypeDeclaration\Rector\FunctionLike\ReturnTypeDeclarationRector

Where UriImplementation implements UriInterface. I would expects that I can mark return type as abstraction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants