Skip to content

Curly braced variables in strings break class scanning #28

@adawolfa

Description

@adawolfa

Version: 4.0.0

Bug Description

Whenever there's a curly braced variable in a string ("{$var}"), $level in scanPhp() is increased twice. As a result, any class within the same file following such token is ignored.

Steps To Reproduce

<?php

print "Hello {$World}!";

class Bar // This class won't be found.
{
    function fn()
    {
    }
}

Issue is not present in v3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions