1.2.1424. Variable Anf Property Typehint

Adds typehints to (local) variables and properties, by inference from the code.

Currently, the variable must be assigned only one type within its context to be typed. Non-typed variables limit the scope of other rules.

This is an internal tool, to help find definitions of classes. The same strategies may happen to arguments, though there is no syntax relay for variables.

<?php

function foo() {
    $a = 1;

    return $a;
}

?>

1.2.1424.1. Connex PHP features

1.2.1424.1.1. Specs

Short name

Complete/VariableTypehint

Rulesets

All, Changed Behavior, First, NoDoc

Exakat since

2.3.2

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

Medium

Available in

Entreprise Edition, Exakat Cloud