moodle-cs icon indicating copy to clipboard operation
moodle-cs copied to clipboard

Incorrect fixing of property names

Open micaherne opened this issue 10 months ago • 1 comments

On running phpcbf on this code with either the moodle or moodle-extra standards, the property is renamed but the property access is not, breaking the code:

class test {

    public string $property_one = 'test';

    public function some_method(): string {
        return $this->property_one;
    }
}

It becomes:

class test {

    public string $propertyone = 'test';

    public function some_method(): string {
        return $this->property_one;
    }
}

micaherne avatar Mar 27 '24 16:03 micaherne