We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Expected: PHPStand understands that such a definition is valid and that $id is set to int by Doctrine.
int
Actual:
Property HelloWorld::$id (int|null) is never assigned int so it can be removed from the property type.
#[ORM\Column(name: 'id', type: 'integer')] #[ORM\Id] #[ORM\GeneratedValue(strategy: 'IDENTITY')] private ?int $id = null; public function __clone() { if ($this->id !== null) { $this->id = null; } // ... } }
Only happens when I have that clone method in place, which says that id is not null 😁
Playground: https://phpstan.org/r/ed1ce389-72ab-4deb-a1bc-6d570db17f87 But in that case it makes sense, as there is no Doctrine annotation/bridge available.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected:
PHPStand understands that such a definition is valid and that $id is set to
int
by Doctrine.Actual:
Only happens when I have that clone method in place, which says that id is not null 😁
Playground: https://phpstan.org/r/ed1ce389-72ab-4deb-a1bc-6d570db17f87
But in that case it makes sense, as there is no Doctrine annotation/bridge available.
The text was updated successfully, but these errors were encountered: