1.2.1249. Undefined Methods

The methods used in the code are undefined.

Defined methods are found in : + Local definitions + __call() definition + PHP native definitions + Extension’s definitions + Included components.

When the origin of the class is not clear, the report is omitted.

<?php

class x {
    function foo() {
        $this->defined();
        $this->undefined();
    }

    function defined() {}
}

?>

1.2.1249.1. Suggestions

  • Fix the name of the method in the methodcall

  • Define the method in the target class

1.2.1249.2. Specs

Short name

Classes/UndefinedMethod

Rulesets

All, Class Review

Exakat since

2.3.6

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

Medium

Features

method

Available in

Entreprise Edition, Exakat Cloud