1.2.514. Has Magic Method

The class has defined one of the magic methods.

The magic methods are : __call(), __callStatic(), __get(), __set(), __isset(), __unset(), __sleep(), __wakeup(), __toString(), __invoke(), __set_state(), __clone() and __debugInfo().

__construct() and __destruct() are omitted here.

<?php

class WithMagic {
    // some more methods, const or properties

    public function __get() {
        // doSomething();
    }
}

?>

See also Property overloading..

1.2.514.1. Specs

Short name

Classes/HasMagicProperty

Rulesets

All, CE

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

magic-method

Available in

Entreprise Edition, Community Edition, Exakat Cloud