PHPCompatibility / PHPCompatibility

PHP Compatibility check for PHP_CodeSniffer

Home Page:http://techblog.wimgodden.be/tag/codesniffer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

__destruct visibility must not be declared as public

magikstm opened this issue · comments

Bug Description

__destruct visibility may be private.

Ref: https://www.php.net/manual/en/language.oop5.magic.php

I'll provide a fix.

Given the following reproduction Scenario

Ref: mikecao/flight#481

I'd expect the following behaviour

No report of an error.

Instead this happened

There is an error reported.

Environment

Tested Against develop branch?

  • I have verified the issue still exists in the develop branch of PHPCompatibility.