Skip to content

Problems with Property Hooks #408

@LordSimal

Description

@LordSimal

Doing a simple

class ConfigChecker
{
    public FTPInterface $ftpCheckObject {
        get {
            return $this->ftpCheckObject;
        }
        set(FTPInterface $value) {
            $this->ftpCheckObject = $value;
        }
    }
}

causes the following errors:

--------------------------------------------------------------------------------
FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
 10 | ERROR   | There must not be more than one property declared per statement
 12 | ERROR   | Visibility must be declared on property "$this"
 12 | ERROR   | Scope modifier not specified for member variable "$this"
 14 | WARNING | Code after the RETURN statement on line 12 cannot be executed
 14 | ERROR   | There must not be more than one property declared per statement
 14 | ERROR   | Visibility must be declared on property "$value"
 14 | ERROR   | Scope modifier not specified for member variable "$value"
 15 | WARNING | Code after the RETURN statement on line 12 cannot be executed
 15 | ERROR   | There must not be more than one property declared per statement
 15 | ERROR   | Visibility must be declared on property "$this"
 15 | ERROR   | Scope modifier not specified for member variable "$this"
 15 | ERROR   | Scope modifier not specified for member variable "$value"
--------------------------------------------------------------------------------

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