Skip to content

method call called 'enum' causes an "Cannot find enum start at position" error #292

Closed
@Levivb

Description

@Levivb

Hey,

Running the code sniffer over the following code causes an error

<?php

declare(strict_types=1);

namespace App\Auth;

final class Test
{
    public function __construct(private readonly SomcClass $someClass)
    {
    }

    public function createFor()
    {
        $this->someClass->enum('test');
    }
}

The error message:
1 | ERROR | An error occurred during processing; checking has been aborted. The error message was: Cannot find enum start at position 67

It seems the bug was introduced in #289

It looks like 'enum' method calls are not handled correctly :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions