moodlehq / moodle-cs

Moodle Coding Style
https://github.com/moodlehq/moodle-cs
GNU General Public License v3.0
18 stars 16 forks source link

Incorrect fixing of property names #138

Open micaherne opened 7 months ago

micaherne commented 7 months ago

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 commented 7 months ago

This is with v3.4.2