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

Psalter tries to add numeric-string as a native return type #4350

Closed
orklah opened this issue Oct 16, 2020 · 1 comment
Closed

Psalter tries to add numeric-string as a native return type #4350

orklah opened this issue Oct 16, 2020 · 1 comment
Labels

Comments

@orklah
Copy link
Collaborator

orklah commented Oct 16, 2020

Hi,

In the following code( https://psalm.dev/r/bd24a24405 ), when clicking on fix code, Psalter will add : numeric-string in the signature, resulting in a compile error

Thanks

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/bd24a24405
<?php

class a{
    /** @var int */
 	private $start;
    
    public function getStart(){
        return (string) $this->start;
    }
}
Psalm output (using commit 234eae6):

INFO: MissingReturnType - 7:21 - Method a::getStart does not have a return type, expecting numeric-string

ERROR: MissingConstructor - 5:11 - a has an uninitialized property a::$start, but no constructor

@muglug muglug added the bug label Oct 16, 2020
@muglug muglug closed this as completed in 76986eb Oct 16, 2020
danog pushed a commit to danog/psalm that referenced this issue Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants