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

Lost type of variable #64

Closed
lulco opened this issue Sep 30, 2022 · 1 comment
Closed

Lost type of variable #64

lulco opened this issue Sep 30, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@lulco
Copy link

lulco commented Sep 30, 2022

Plugin lost type of variable when it is used in function:

{varType FooBar[] $fooBars}

{foreach $fooBars as $fooBar}
    {$fooBar->doSomething()} // everything ok
{/foreach}

{foreach array_slice($fooBars, 0, 4) as $fooBar}
    {$fooBar->doSomething()} // lost type of $fooBar (should be FooBar)
{/foreach}

There are several functions like this, maybe plugin can get inspiration in phpstan

@lulco lulco added the enhancement New feature or request label Sep 30, 2022
@mesour
Copy link
Contributor

mesour commented Sep 24, 2023

@lulco duplicity #131

@mesour mesour closed this as completed Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants