Skip to content

Problems with Property Hooks #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
LordSimal opened this issue Dec 28, 2024 · 1 comment
Open

Problems with Property Hooks #408

LordSimal opened this issue Dec 28, 2024 · 1 comment

Comments

@LordSimal
Copy link
Contributor

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"
--------------------------------------------------------------------------------
@LordSimal
Copy link
Contributor Author

Seems like PHP_Codesniffer is not 8.4 ready yet

PHPCSStandards/PHP_CodeSniffer#734

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant