.. _classes-ambiguousvisibilities: .. _ambiguous-visibilities: Ambiguous Visibilities ++++++++++++++++++++++ The properties have the same name, but have different visibilities, across different classes. While it is legit to have a property with the same name in different classes, it may easily lead to confusion. As soon as the context is need to understand if the property is accessible or not, the readability suffers. It is recommended to handle the same properties in the same way across classes, even when the classes are not related. .. code-block:: php name; ?> Connex PHP features ------------------- + `class `_ + `visibility `_ Suggestions ___________ * Sync visibilities for both properties, in the different classes * Use different names for properties with different usages Specs _____ +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Classes/AmbiguousVisibilities | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior `, :ref:`Semantics ` | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 1.3.4 | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Slow (1 hour) | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Examples | :ref:`case-typo3-classes-ambiguousvisibilities` | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Related rule | :ref:`missing-visibility` | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------+