Skip to content

[DowngradePhp80] Add DowngradeSubstrFalsyRector #9413

@samsonasik

Description

@samsonasik

Feature Request

Diff

-return substr('a', 2);
+return (string) substr('a', 2);

Add cast, to ensure it always string. Ref https://3v4l.org/PGpEe

This needs to identify its usage to avoid too many changes in many area.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions