.. _structures-iffectation: .. _iffectations: Iffectations ++++++++++++ Affectations that appears in a condition. Iffectations are a way to do both a test and an affectations. They may also be typos, such as if ($x = 3) { `... `_ }, leading to a constant condition. .. code-block:: php Connex PHP features ------------------- + `assignation `_ Suggestions ___________ * Move the assignation inside the loop, and make an existence test in the condition. * Move the assignation before the if/then, make an existence test in the condition. Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/Iffectation | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+