1.2.200. Compared But Not Assigned Strings

Those strings are compared to variables in the code, but those values are never assigned.

<?php

// some assigned strings in the code
$a = 'b';

// some compared strings in the code
// Depending on the origin of $b, is this possible?
if ($b === 'c') {

}

?>

1.2.200.1. Specs

Short name

Structures/ComparedButNotAssignedStrings

Rulesets

All

Exakat since

1.3.2

PHP Version

All

Severity

Minor

Time To Fix

Slow (1 hour)

Precision

High

Available in

Entreprise Edition, Exakat Cloud