Skip to content

concat without assigment #10389

@staabm

Description

@staabm

Feature request

today I stumbled over a bug, in which someone missed to echo the result of a string-concatenation, effectively producing a useless concatenation.

would be great if phpstan could error about the concat beeing useless:
https://phpstan.org/r/b76066d6-5fb9-440b-a1f2-16651b6a062d

same could be true for other operations when no assignment is done
https://phpstan.org/r/ae8ba301-436a-4945-aa39-181d7536620c

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions