1.2.883. Only Static Methods Class

This rule marks a class that only contains static methods. Such classes are tool classes, with definition of methods that can be called without an object. This is akin to functions, with autoloading possibilities.

<?php

class x {
    static function foo() {}
    static function goo() {}
    static function hoo() {}
}

?>

1.2.883.1. Connex PHP features

1.2.883.1.1. Specs

Short name

Classes/OnlyStaticMethods

Rulesets

All, Changed Behavior

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

Very high

Available in

Entreprise Edition, Exakat Cloud