diff --git a/doc/rules/alias/array_push.rst b/doc/rules/alias/array_push.rst index d92d8769955..9387a13adb2 100644 --- a/doc/rules/alias/array_push.rst +++ b/doc/rules/alias/array_push.rst @@ -4,9 +4,13 @@ Rule ``array_push`` Converts simple usages of ``array_push($x, $y);`` to ``$x[] = $y;``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when the function ``array_push`` is overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when the function ``array_push`` is overridden. Examples -------- diff --git a/doc/rules/alias/ereg_to_preg.rst b/doc/rules/alias/ereg_to_preg.rst index 37f4e2d06a1..a23176b7f8d 100644 --- a/doc/rules/alias/ereg_to_preg.rst +++ b/doc/rules/alias/ereg_to_preg.rst @@ -4,9 +4,13 @@ Rule ``ereg_to_preg`` Replace deprecated ``ereg`` regular expression functions with ``preg``. -.. warning:: Using this rule is risky. +Warning +------- - Risky if the ``ereg`` function is overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky if the ``ereg`` function is overridden. Examples -------- diff --git a/doc/rules/alias/mb_str_functions.rst b/doc/rules/alias/mb_str_functions.rst index 3164b5687de..12e40b84b2b 100644 --- a/doc/rules/alias/mb_str_functions.rst +++ b/doc/rules/alias/mb_str_functions.rst @@ -4,10 +4,14 @@ Rule ``mb_str_functions`` Replace non multibyte-safe functions with corresponding mb function. -.. warning:: Using this rule is risky. +Warning +------- - Risky when any of the functions are overridden, or when relying on the string - byte size rather than its length in characters. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when any of the functions are overridden, or when relying on the string +byte size rather than its length in characters. Examples -------- diff --git a/doc/rules/alias/modernize_strpos.rst b/doc/rules/alias/modernize_strpos.rst index 51f270a3d7f..d6a2d0871af 100644 --- a/doc/rules/alias/modernize_strpos.rst +++ b/doc/rules/alias/modernize_strpos.rst @@ -5,10 +5,14 @@ Rule ``modernize_strpos`` Replace ``strpos()`` calls with ``str_starts_with()`` or ``str_contains()`` if possible. -.. warning:: Using this rule is risky. +Warning +------- - Risky if ``strpos``, ``str_starts_with`` or ``str_contains`` functions are - overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky if ``strpos``, ``str_starts_with`` or ``str_contains`` functions are +overridden. Examples -------- diff --git a/doc/rules/alias/no_alias_functions.rst b/doc/rules/alias/no_alias_functions.rst index c402436dae1..27d706dd886 100644 --- a/doc/rules/alias/no_alias_functions.rst +++ b/doc/rules/alias/no_alias_functions.rst @@ -4,9 +4,13 @@ Rule ``no_alias_functions`` Master functions shall be used instead of aliases. -.. warning:: Using this rule is risky. +Warning +------- - Risky when any of the alias functions are overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when any of the alias functions are overridden. Configuration ------------- diff --git a/doc/rules/alias/pow_to_exponentiation.rst b/doc/rules/alias/pow_to_exponentiation.rst index 5fe1db3d7b7..a6306a11714 100644 --- a/doc/rules/alias/pow_to_exponentiation.rst +++ b/doc/rules/alias/pow_to_exponentiation.rst @@ -4,9 +4,13 @@ Rule ``pow_to_exponentiation`` Converts ``pow`` to the ``**`` operator. -.. warning:: Using this rule is risky. +Warning +------- - Risky when the function ``pow`` is overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when the function ``pow`` is overridden. Examples -------- diff --git a/doc/rules/alias/random_api_migration.rst b/doc/rules/alias/random_api_migration.rst index 14d979d79bc..6b981ce1a4d 100644 --- a/doc/rules/alias/random_api_migration.rst +++ b/doc/rules/alias/random_api_migration.rst @@ -5,10 +5,14 @@ Rule ``random_api_migration`` Replaces ``rand``, ``srand``, ``getrandmax`` functions calls with their ``mt_*`` analogs or ``random_int``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when the configured functions are overridden. Or when relying on the - seed based generating of the numbers. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when the configured functions are overridden. Or when relying on the seed +based generating of the numbers. Configuration ------------- diff --git a/doc/rules/alias/set_type_to_cast.rst b/doc/rules/alias/set_type_to_cast.rst index 500cb1f6c4f..cbb2c0122cc 100644 --- a/doc/rules/alias/set_type_to_cast.rst +++ b/doc/rules/alias/set_type_to_cast.rst @@ -4,10 +4,14 @@ Rule ``set_type_to_cast`` Cast shall be used, not ``settype``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when the ``settype`` function is overridden or when used as the 2nd or - 3rd expression in a ``for`` loop . +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when the ``settype`` function is overridden or when used as the 2nd or 3rd +expression in a ``for`` loop . Examples -------- diff --git a/doc/rules/basic/non_printable_character.rst b/doc/rules/basic/non_printable_character.rst index 910f85b1290..bc80dcb895e 100644 --- a/doc/rules/basic/non_printable_character.rst +++ b/doc/rules/basic/non_printable_character.rst @@ -5,9 +5,13 @@ Rule ``non_printable_character`` Remove Zero-width space (ZWSP), Non-breaking space (NBSP) and other invisible unicode symbols. -.. warning:: Using this rule is risky. +Warning +------- - Risky when strings contain intended invisible characters. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when strings contain intended invisible characters. Configuration ------------- diff --git a/doc/rules/basic/psr_autoloading.rst b/doc/rules/basic/psr_autoloading.rst index a5460ce7796..6101250a62c 100644 --- a/doc/rules/basic/psr_autoloading.rst +++ b/doc/rules/basic/psr_autoloading.rst @@ -5,10 +5,14 @@ Rule ``psr_autoloading`` Classes must be in a path that matches their namespace, be at least one namespace deep and the class name should match the file name. -.. warning:: Using this rule is risky. +Warning +------- - This fixer may change your class name, which will break the code that depends - on the old name. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +This fixer may change your class name, which will break the code that depends on +the old name. Configuration ------------- diff --git a/doc/rules/cast_notation/modernize_types_casting.rst b/doc/rules/cast_notation/modernize_types_casting.rst index 8b575f21369..7ccc1d98457 100644 --- a/doc/rules/cast_notation/modernize_types_casting.rst +++ b/doc/rules/cast_notation/modernize_types_casting.rst @@ -5,10 +5,14 @@ Rule ``modernize_types_casting`` Replaces ``intval``, ``floatval``, ``doubleval``, ``strval`` and ``boolval`` function calls with according type casting operator. -.. warning:: Using this rule is risky. +Warning +------- - Risky if any of the functions ``intval``, ``floatval``, ``doubleval``, - ``strval`` or ``boolval`` are overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky if any of the functions ``intval``, ``floatval``, ``doubleval``, +``strval`` or ``boolval`` are overridden. Examples -------- diff --git a/doc/rules/class_notation/final_class.rst b/doc/rules/class_notation/final_class.rst index c7270784a28..bbb05bdcaf4 100644 --- a/doc/rules/class_notation/final_class.rst +++ b/doc/rules/class_notation/final_class.rst @@ -17,9 +17,13 @@ need to extend a standalone class, create an interface and use the Composite pattern. If you aren't ready yet for serious OOP, go with FinalInternalClassFixer, it's fine. -.. warning:: Using this rule is risky. +Warning +------- - Risky when subclassing non-abstract classes. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when subclassing non-abstract classes. Examples -------- diff --git a/doc/rules/class_notation/final_internal_class.rst b/doc/rules/class_notation/final_internal_class.rst index 3717d64d3d8..33881db7c87 100644 --- a/doc/rules/class_notation/final_internal_class.rst +++ b/doc/rules/class_notation/final_internal_class.rst @@ -4,9 +4,13 @@ Rule ``final_internal_class`` Internal classes should be ``final``. -.. warning:: Using this rule is risky. +Warning +------- - Changing classes to ``final`` might cause code execution to break. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Changing classes to ``final`` might cause code execution to break. Configuration ------------- diff --git a/doc/rules/class_notation/final_public_method_for_abstract_class.rst b/doc/rules/class_notation/final_public_method_for_abstract_class.rst index 66455488bdc..7af2e2e282c 100644 --- a/doc/rules/class_notation/final_public_method_for_abstract_class.rst +++ b/doc/rules/class_notation/final_public_method_for_abstract_class.rst @@ -10,9 +10,13 @@ Description Enforce API encapsulation in an inheritance architecture. If you want to override a method, use the Template method pattern. -.. warning:: Using this rule is risky. +Warning +------- - Risky when overriding ``public`` methods of ``abstract`` classes. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when overriding ``public`` methods of ``abstract`` classes. Examples -------- diff --git a/doc/rules/class_notation/no_php4_constructor.rst b/doc/rules/class_notation/no_php4_constructor.rst index e268ca99e8a..478c08d0a0e 100644 --- a/doc/rules/class_notation/no_php4_constructor.rst +++ b/doc/rules/class_notation/no_php4_constructor.rst @@ -4,10 +4,14 @@ Rule ``no_php4_constructor`` Convert PHP4-style constructors to ``__construct``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when old style constructor being fixed is overridden or overrides - parent one. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when old style constructor being fixed is overridden or overrides parent +one. Examples -------- diff --git a/doc/rules/class_notation/no_unneeded_final_method.rst b/doc/rules/class_notation/no_unneeded_final_method.rst index 1544c22170c..221cb48a8dd 100644 --- a/doc/rules/class_notation/no_unneeded_final_method.rst +++ b/doc/rules/class_notation/no_unneeded_final_method.rst @@ -5,9 +5,13 @@ Rule ``no_unneeded_final_method`` A ``final`` class must not have ``final`` methods and ``private`` methods must not be ``final``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when child class overrides a ``private`` method. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when child class overrides a ``private`` method. Configuration ------------- diff --git a/doc/rules/class_notation/ordered_interfaces.rst b/doc/rules/class_notation/ordered_interfaces.rst index d543f740d3c..c3ca839b5b3 100644 --- a/doc/rules/class_notation/ordered_interfaces.rst +++ b/doc/rules/class_notation/ordered_interfaces.rst @@ -4,11 +4,15 @@ Rule ``ordered_interfaces`` Orders the interfaces in an ``implements`` or ``interface extends`` clause. -.. warning:: Using this rule is risky. +Warning +------- - Risky for ``implements`` when specifying both an interface and its parent - interface, because PHP doesn't break on ``parent, child`` but does on - ``child, parent``. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky for ``implements`` when specifying both an interface and its parent +interface, because PHP doesn't break on ``parent, child`` but does on ``child, +parent``. Configuration ------------- diff --git a/doc/rules/class_notation/ordered_traits.rst b/doc/rules/class_notation/ordered_traits.rst index 764e70eae4f..afb526f5c69 100644 --- a/doc/rules/class_notation/ordered_traits.rst +++ b/doc/rules/class_notation/ordered_traits.rst @@ -4,9 +4,13 @@ Rule ``ordered_traits`` Trait ``use`` statements must be sorted alphabetically. -.. warning:: Using this rule is risky. +Warning +------- - Risky when depending on order of the imports. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when depending on order of the imports. Examples -------- diff --git a/doc/rules/class_notation/self_accessor.rst b/doc/rules/class_notation/self_accessor.rst index c7b519b53a8..97f02d8952a 100644 --- a/doc/rules/class_notation/self_accessor.rst +++ b/doc/rules/class_notation/self_accessor.rst @@ -5,10 +5,13 @@ Rule ``self_accessor`` Inside class or interface element ``self`` should be preferred to the class name itself. -.. warning:: Using this rule is risky. +Warning +------- - Risky when using dynamic calls like get_called_class() or late static - binding. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when using dynamic calls like get_called_class() or late static binding. Examples -------- diff --git a/doc/rules/class_usage/date_time_immutable.rst b/doc/rules/class_usage/date_time_immutable.rst index ae31f949139..a7ed0a37b9e 100644 --- a/doc/rules/class_usage/date_time_immutable.rst +++ b/doc/rules/class_usage/date_time_immutable.rst @@ -4,10 +4,14 @@ Rule ``date_time_immutable`` Class ``DateTimeImmutable`` should be used instead of ``DateTime``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when the code relies on modifying ``DateTime`` objects or if any of the - ``date_create*`` functions are overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when the code relies on modifying ``DateTime`` objects or if any of the +``date_create*`` functions are overridden. Examples -------- diff --git a/doc/rules/comment/comment_to_phpdoc.rst b/doc/rules/comment/comment_to_phpdoc.rst index b8bd2435c83..96906189149 100644 --- a/doc/rules/comment/comment_to_phpdoc.rst +++ b/doc/rules/comment/comment_to_phpdoc.rst @@ -4,10 +4,14 @@ Rule ``comment_to_phpdoc`` Comments with annotation should be docblock when used on structural elements. -.. warning:: Using this rule is risky. +Warning +------- - Risky as new docblocks might mean more, e.g. a Doctrine entity might have a - new column in database. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky as new docblocks might mean more, e.g. a Doctrine entity might have a new +column in database. Configuration ------------- diff --git a/doc/rules/constant_notation/native_constant_invocation.rst b/doc/rules/constant_notation/native_constant_invocation.rst index 309c451cfc7..bbe1c1624a5 100644 --- a/doc/rules/constant_notation/native_constant_invocation.rst +++ b/doc/rules/constant_notation/native_constant_invocation.rst @@ -6,9 +6,13 @@ Add leading ``\`` before constant invocation of internal constant to speed up resolving. Constant name match is case-sensitive, except for ``null``, ``false`` and ``true``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when any of the constants are namespaced or overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when any of the constants are namespaced or overridden. Configuration ------------- diff --git a/doc/rules/function_notation/combine_nested_dirname.rst b/doc/rules/function_notation/combine_nested_dirname.rst index 5a811b0c691..8c8b1895429 100644 --- a/doc/rules/function_notation/combine_nested_dirname.rst +++ b/doc/rules/function_notation/combine_nested_dirname.rst @@ -5,9 +5,13 @@ Rule ``combine_nested_dirname`` Replace multiple nested calls of ``dirname`` by only one call with second ``$level`` parameter. Requires PHP >= 7.0. -.. warning:: Using this rule is risky. +Warning +------- - Risky when the function ``dirname`` is overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when the function ``dirname`` is overridden. Examples -------- diff --git a/doc/rules/function_notation/fopen_flag_order.rst b/doc/rules/function_notation/fopen_flag_order.rst index a282421d727..0f09230ac03 100644 --- a/doc/rules/function_notation/fopen_flag_order.rst +++ b/doc/rules/function_notation/fopen_flag_order.rst @@ -4,9 +4,13 @@ Rule ``fopen_flag_order`` Order the flags in ``fopen`` calls, ``b`` and ``t`` must be last. -.. warning:: Using this rule is risky. +Warning +------- - Risky when the function ``fopen`` is overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when the function ``fopen`` is overridden. Examples -------- diff --git a/doc/rules/function_notation/fopen_flags.rst b/doc/rules/function_notation/fopen_flags.rst index 988e4b968b1..82ed8686e4f 100644 --- a/doc/rules/function_notation/fopen_flags.rst +++ b/doc/rules/function_notation/fopen_flags.rst @@ -5,9 +5,13 @@ Rule ``fopen_flags`` The flags in ``fopen`` calls must omit ``t``, and ``b`` must be omitted or included consistently. -.. warning:: Using this rule is risky. +Warning +------- - Risky when the function ``fopen`` is overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when the function ``fopen`` is overridden. Configuration ------------- diff --git a/doc/rules/function_notation/implode_call.rst b/doc/rules/function_notation/implode_call.rst index 9fc49f24806..e3070f7702c 100644 --- a/doc/rules/function_notation/implode_call.rst +++ b/doc/rules/function_notation/implode_call.rst @@ -4,9 +4,13 @@ Rule ``implode_call`` Function ``implode`` must be called with 2 arguments in the documented order. -.. warning:: Using this rule is risky. +Warning +------- - Risky when the function ``implode`` is overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when the function ``implode`` is overridden. Examples -------- diff --git a/doc/rules/function_notation/native_function_invocation.rst b/doc/rules/function_notation/native_function_invocation.rst index 043edc4cca4..b655e1f5586 100644 --- a/doc/rules/function_notation/native_function_invocation.rst +++ b/doc/rules/function_notation/native_function_invocation.rst @@ -4,9 +4,13 @@ Rule ``native_function_invocation`` Add leading ``\`` before function invocation to speed up resolving. -.. warning:: Using this rule is risky. +Warning +------- - Risky when any of the functions are overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when any of the functions are overridden. Configuration ------------- diff --git a/doc/rules/function_notation/no_unreachable_default_argument_value.rst b/doc/rules/function_notation/no_unreachable_default_argument_value.rst index f153f4c2e50..01f97ea33f5 100644 --- a/doc/rules/function_notation/no_unreachable_default_argument_value.rst +++ b/doc/rules/function_notation/no_unreachable_default_argument_value.rst @@ -5,11 +5,14 @@ Rule ``no_unreachable_default_argument_value`` In function arguments there must not be arguments with default values before non-default ones. -.. warning:: Using this rule is risky. +Warning +------- - Modifies the signature of functions; therefore risky when using systems (such - as some Symfony components) that rely on those (for example through - reflection). +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Modifies the signature of functions; therefore risky when using systems (such as +some Symfony components) that rely on those (for example through reflection). Examples -------- diff --git a/doc/rules/function_notation/no_useless_sprintf.rst b/doc/rules/function_notation/no_useless_sprintf.rst index d2540006286..0d31ffe6589 100644 --- a/doc/rules/function_notation/no_useless_sprintf.rst +++ b/doc/rules/function_notation/no_useless_sprintf.rst @@ -4,9 +4,13 @@ Rule ``no_useless_sprintf`` There must be no ``sprintf`` calls with only the first argument. -.. warning:: Using this rule is risky. +Warning +------- - Risky when if the ``sprintf`` function is overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when if the ``sprintf`` function is overridden. Examples -------- diff --git a/doc/rules/function_notation/phpdoc_to_param_type.rst b/doc/rules/function_notation/phpdoc_to_param_type.rst index a176e966d64..5c7b06566ae 100644 --- a/doc/rules/function_notation/phpdoc_to_param_type.rst +++ b/doc/rules/function_notation/phpdoc_to_param_type.rst @@ -5,13 +5,17 @@ Rule ``phpdoc_to_param_type`` EXPERIMENTAL: Takes ``@param`` annotations of non-mixed types and adjusts accordingly the function signature. Requires PHP >= 7.0. -.. warning:: Using this rule is risky. +Warning +------- - This rule is EXPERIMENTAL and [1] is not covered with backward compatibility - promise. [2] ``@param`` annotation is mandatory for the fixer to make - changes, signatures of methods without it (no docblock, inheritdocs) will not - be fixed. [3] Manual actions are required if inherited signatures are not - properly documented. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +This rule is EXPERIMENTAL and [1] is not covered with backward compatibility +promise. [2] ``@param`` annotation is mandatory for the fixer to make changes, +signatures of methods without it (no docblock, inheritdocs) will not be fixed. +[3] Manual actions are required if inherited signatures are not properly +documented. Configuration ------------- diff --git a/doc/rules/function_notation/phpdoc_to_property_type.rst b/doc/rules/function_notation/phpdoc_to_property_type.rst index 0f0b95360f6..d8342578168 100644 --- a/doc/rules/function_notation/phpdoc_to_property_type.rst +++ b/doc/rules/function_notation/phpdoc_to_property_type.rst @@ -5,13 +5,17 @@ Rule ``phpdoc_to_property_type`` EXPERIMENTAL: Takes ``@var`` annotation of non-mixed types and adjusts accordingly the property signature. Requires PHP >= 7.4. -.. warning:: Using this rule is risky. +Warning +------- - This rule is EXPERIMENTAL and [1] is not covered with backward compatibility - promise. [2] ``@var`` annotation is mandatory for the fixer to make changes, - signatures of properties without it (no docblock) will not be fixed. [3] - Manual actions might be required for newly typed properties that are read - before initialization. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +This rule is EXPERIMENTAL and [1] is not covered with backward compatibility +promise. [2] ``@var`` annotation is mandatory for the fixer to make changes, +signatures of properties without it (no docblock) will not be fixed. [3] Manual +actions might be required for newly typed properties that are read before +initialization. Configuration ------------- diff --git a/doc/rules/function_notation/phpdoc_to_return_type.rst b/doc/rules/function_notation/phpdoc_to_return_type.rst index 2ea166cb253..7c04a12bceb 100644 --- a/doc/rules/function_notation/phpdoc_to_return_type.rst +++ b/doc/rules/function_notation/phpdoc_to_return_type.rst @@ -5,13 +5,17 @@ Rule ``phpdoc_to_return_type`` EXPERIMENTAL: Takes ``@return`` annotation of non-mixed types and adjusts accordingly the function signature. Requires PHP >= 7.0. -.. warning:: Using this rule is risky. +Warning +------- - This rule is EXPERIMENTAL and [1] is not covered with backward compatibility - promise. [2] ``@return`` annotation is mandatory for the fixer to make - changes, signatures of methods without it (no docblock, inheritdocs) will not - be fixed. [3] Manual actions are required if inherited signatures are not - properly documented. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +This rule is EXPERIMENTAL and [1] is not covered with backward compatibility +promise. [2] ``@return`` annotation is mandatory for the fixer to make changes, +signatures of methods without it (no docblock, inheritdocs) will not be fixed. +[3] Manual actions are required if inherited signatures are not properly +documented. Configuration ------------- diff --git a/doc/rules/function_notation/regular_callable_call.rst b/doc/rules/function_notation/regular_callable_call.rst index f23e856e3e2..cbcd032ce62 100644 --- a/doc/rules/function_notation/regular_callable_call.rst +++ b/doc/rules/function_notation/regular_callable_call.rst @@ -4,12 +4,16 @@ Rule ``regular_callable_call`` Callables must be called without using ``call_user_func*`` when possible. -.. warning:: Using this rule is risky. +Warning +------- - Risky when the ``call_user_func`` or ``call_user_func_array`` function is - overridden or when are used in constructions that should be avoided, like - ``call_user_func_array('foo', ['bar' => 'baz'])`` or ``call_user_func($foo, - $foo = 'bar')``. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when the ``call_user_func`` or ``call_user_func_array`` function is +overridden or when are used in constructions that should be avoided, like +``call_user_func_array('foo', ['bar' => 'baz'])`` or ``call_user_func($foo, $foo += 'bar')``. Examples -------- diff --git a/doc/rules/function_notation/static_lambda.rst b/doc/rules/function_notation/static_lambda.rst index 5e2d9e29b91..88697942105 100644 --- a/doc/rules/function_notation/static_lambda.rst +++ b/doc/rules/function_notation/static_lambda.rst @@ -4,9 +4,13 @@ Rule ``static_lambda`` Lambdas not (indirect) referencing ``$this`` must be declared ``static``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when using ``->bindTo`` on lambdas without referencing to ``$this``. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when using ``->bindTo`` on lambdas without referencing to ``$this``. Examples -------- diff --git a/doc/rules/function_notation/use_arrow_functions.rst b/doc/rules/function_notation/use_arrow_functions.rst index 24f700046ab..934b9876f8c 100644 --- a/doc/rules/function_notation/use_arrow_functions.rst +++ b/doc/rules/function_notation/use_arrow_functions.rst @@ -4,10 +4,14 @@ Rule ``use_arrow_functions`` Anonymous functions with one-liner return statement must use arrow functions. -.. warning:: Using this rule is risky. +Warning +------- - Risky when using ``isset()`` on outside variables that are not imported with - ``use ()``. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when using ``isset()`` on outside variables that are not imported with +``use ()``. Examples -------- diff --git a/doc/rules/function_notation/void_return.rst b/doc/rules/function_notation/void_return.rst index d03181b2101..06d4c4d44dc 100644 --- a/doc/rules/function_notation/void_return.rst +++ b/doc/rules/function_notation/void_return.rst @@ -5,9 +5,13 @@ Rule ``void_return`` Add ``void`` return type to functions with missing or empty return statements, but priority is given to ``@return`` annotations. Requires PHP >= 7.1. -.. warning:: Using this rule is risky. +Warning +------- - Modifies the signature of functions. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Modifies the signature of functions. Examples -------- diff --git a/doc/rules/language_construct/class_keyword_remove.rst b/doc/rules/language_construct/class_keyword_remove.rst index d59a7e51340..55e54812066 100644 --- a/doc/rules/language_construct/class_keyword_remove.rst +++ b/doc/rules/language_construct/class_keyword_remove.rst @@ -2,10 +2,14 @@ Rule ``class_keyword_remove`` ============================= -.. warning:: This rule is deprecated and will be removed on next major version. - Converts ``::class`` keywords to FQCN strings. +Warning +------- + +This rule is deprecated and will be removed on next major version +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Examples -------- diff --git a/doc/rules/language_construct/dir_constant.rst b/doc/rules/language_construct/dir_constant.rst index 522340bb477..cfeb815b8c8 100644 --- a/doc/rules/language_construct/dir_constant.rst +++ b/doc/rules/language_construct/dir_constant.rst @@ -4,9 +4,13 @@ Rule ``dir_constant`` Replaces ``dirname(__FILE__)`` expression with equivalent ``__DIR__`` constant. -.. warning:: Using this rule is risky. +Warning +------- - Risky when the function ``dirname`` is overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when the function ``dirname`` is overridden. Examples -------- diff --git a/doc/rules/language_construct/error_suppression.rst b/doc/rules/language_construct/error_suppression.rst index dfb2510da91..947025e02fb 100644 --- a/doc/rules/language_construct/error_suppression.rst +++ b/doc/rules/language_construct/error_suppression.rst @@ -5,10 +5,14 @@ Rule ``error_suppression`` Error control operator should be added to deprecation notices and/or removed from other cases. -.. warning:: Using this rule is risky. +Warning +------- - Risky because adding/removing ``@`` might cause changes to code behaviour or - if ``trigger_error`` function is overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky because adding/removing ``@`` might cause changes to code behaviour or if +``trigger_error`` function is overridden. Configuration ------------- diff --git a/doc/rules/language_construct/function_to_constant.rst b/doc/rules/language_construct/function_to_constant.rst index 88d3ad97e0d..cbcc4f0241f 100644 --- a/doc/rules/language_construct/function_to_constant.rst +++ b/doc/rules/language_construct/function_to_constant.rst @@ -4,9 +4,13 @@ Rule ``function_to_constant`` Replace core functions calls returning constants with the constants. -.. warning:: Using this rule is risky. +Warning +------- - Risky when any of the configured functions to replace are overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when any of the configured functions to replace are overridden. Configuration ------------- diff --git a/doc/rules/language_construct/get_class_to_class_keyword.rst b/doc/rules/language_construct/get_class_to_class_keyword.rst index c9a0674b92c..12df709648c 100644 --- a/doc/rules/language_construct/get_class_to_class_keyword.rst +++ b/doc/rules/language_construct/get_class_to_class_keyword.rst @@ -4,9 +4,13 @@ Rule ``get_class_to_class_keyword`` Replace ``get_class`` calls on object variables with class keyword syntax. -.. warning:: Using this rule is risky. +Warning +------- - Risky if the ``get_class`` function is overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky if the ``get_class`` function is overridden. Examples -------- diff --git a/doc/rules/language_construct/is_null.rst b/doc/rules/language_construct/is_null.rst index 6fd3ac85a88..f3e8d45ec73 100644 --- a/doc/rules/language_construct/is_null.rst +++ b/doc/rules/language_construct/is_null.rst @@ -4,9 +4,13 @@ Rule ``is_null`` Replaces ``is_null($var)`` expression with ``null === $var``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when the function ``is_null`` is overridden. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when the function ``is_null`` is overridden. Examples -------- diff --git a/doc/rules/language_construct/no_unset_on_property.rst b/doc/rules/language_construct/no_unset_on_property.rst index 20c804649c6..8d1ebb6f602 100644 --- a/doc/rules/language_construct/no_unset_on_property.rst +++ b/doc/rules/language_construct/no_unset_on_property.rst @@ -4,13 +4,17 @@ Rule ``no_unset_on_property`` Properties should be set to ``null`` instead of using ``unset``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when relying on attributes to be removed using ``unset`` rather than be - set to ``null``. Changing variables to ``null`` instead of unsetting means - these still show up when looping over class variables and reference - properties remain unbroken. With PHP 7.4, this rule might introduce ``null`` - assignments to properties whose type declaration does not allow it. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when relying on attributes to be removed using ``unset`` rather than be +set to ``null``. Changing variables to ``null`` instead of unsetting means these +still show up when looping over class variables and reference properties remain +unbroken. With PHP 7.4, this rule might introduce ``null`` assignments to +properties whose type declaration does not allow it. Examples -------- diff --git a/doc/rules/naming/no_homoglyph_names.rst b/doc/rules/naming/no_homoglyph_names.rst index 7aa83c7ec01..58cf1296fa8 100644 --- a/doc/rules/naming/no_homoglyph_names.rst +++ b/doc/rules/naming/no_homoglyph_names.rst @@ -4,10 +4,14 @@ Rule ``no_homoglyph_names`` Replace accidental usage of homoglyphs (non ascii characters) in names. -.. warning:: Using this rule is risky. +Warning +------- - Renames classes and cannot rename the files. You might have string references - to renamed code (``$$name``). +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Renames classes and cannot rename the files. You might have string references to +renamed code (``$$name``). Examples -------- diff --git a/doc/rules/operator/logical_operators.rst b/doc/rules/operator/logical_operators.rst index 4838d2506cf..1ad8246660c 100644 --- a/doc/rules/operator/logical_operators.rst +++ b/doc/rules/operator/logical_operators.rst @@ -4,10 +4,14 @@ Rule ``logical_operators`` Use ``&&`` and ``||`` logical operators instead of ``and`` and ``or``. -.. warning:: Using this rule is risky. +Warning +------- - Risky, because you must double-check if using and/or with lower precedence - was intentional. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky, because you must double-check if using and/or with lower precedence was +intentional. Examples -------- diff --git a/doc/rules/operator/ternary_to_elvis_operator.rst b/doc/rules/operator/ternary_to_elvis_operator.rst index b99d00501e8..8236ee48d3b 100644 --- a/doc/rules/operator/ternary_to_elvis_operator.rst +++ b/doc/rules/operator/ternary_to_elvis_operator.rst @@ -4,9 +4,13 @@ Rule ``ternary_to_elvis_operator`` Use the Elvis operator ``?:`` where possible. -.. warning:: Using this rule is risky. +Warning +------- - Risky when relying on functions called on both sides of the ``?`` operator. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when relying on functions called on both sides of the ``?`` operator. Examples -------- diff --git a/doc/rules/php_unit/php_unit_construct.rst b/doc/rules/php_unit/php_unit_construct.rst index 877ce5cffd6..ca5ec622358 100644 --- a/doc/rules/php_unit/php_unit_construct.rst +++ b/doc/rules/php_unit/php_unit_construct.rst @@ -5,9 +5,13 @@ Rule ``php_unit_construct`` PHPUnit assertion method calls like ``->assertSame(true, $foo)`` should be written with dedicated method like ``->assertTrue($foo)``. -.. warning:: Using this rule is risky. +Warning +------- - Fixer could be risky if one is overriding PHPUnit's native methods. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Fixer could be risky if one is overriding PHPUnit's native methods. Configuration ------------- diff --git a/doc/rules/php_unit/php_unit_dedicate_assert.rst b/doc/rules/php_unit/php_unit_dedicate_assert.rst index adeb980ac75..eb88546b13e 100644 --- a/doc/rules/php_unit/php_unit_dedicate_assert.rst +++ b/doc/rules/php_unit/php_unit_dedicate_assert.rst @@ -5,9 +5,13 @@ Rule ``php_unit_dedicate_assert`` PHPUnit assertions like ``assertInternalType``, ``assertFileExists``, should be used over ``assertTrue``. -.. warning:: Using this rule is risky. +Warning +------- - Fixer could be risky if one is overriding PHPUnit's native methods. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Fixer could be risky if one is overriding PHPUnit's native methods. Configuration ------------- diff --git a/doc/rules/php_unit/php_unit_dedicate_assert_internal_type.rst b/doc/rules/php_unit/php_unit_dedicate_assert_internal_type.rst index d2a11b7d9f5..47b3c0c126c 100644 --- a/doc/rules/php_unit/php_unit_dedicate_assert_internal_type.rst +++ b/doc/rules/php_unit/php_unit_dedicate_assert_internal_type.rst @@ -5,10 +5,14 @@ Rule ``php_unit_dedicate_assert_internal_type`` PHPUnit assertions like ``assertIsArray`` should be used over ``assertInternalType``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when PHPUnit methods are overridden or when project has PHPUnit - incompatibilities. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when PHPUnit methods are overridden or when project has PHPUnit +incompatibilities. Configuration ------------- diff --git a/doc/rules/php_unit/php_unit_expectation.rst b/doc/rules/php_unit/php_unit_expectation.rst index 573e8e51fab..ee35b5aa9dd 100644 --- a/doc/rules/php_unit/php_unit_expectation.rst +++ b/doc/rules/php_unit/php_unit_expectation.rst @@ -5,10 +5,14 @@ Rule ``php_unit_expectation`` Usages of ``->setExpectedException*`` methods MUST be replaced by ``->expectException*`` methods. -.. warning:: Using this rule is risky. +Warning +------- - Risky when PHPUnit classes are overridden or not accessible, or when project - has PHPUnit incompatibilities. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when PHPUnit classes are overridden or not accessible, or when project has +PHPUnit incompatibilities. Configuration ------------- diff --git a/doc/rules/php_unit/php_unit_mock.rst b/doc/rules/php_unit/php_unit_mock.rst index 81e5eb21b81..e8117a4c77d 100644 --- a/doc/rules/php_unit/php_unit_mock.rst +++ b/doc/rules/php_unit/php_unit_mock.rst @@ -5,10 +5,14 @@ Rule ``php_unit_mock`` Usages of ``->getMock`` and ``->getMockWithoutInvokingTheOriginalConstructor`` methods MUST be replaced by ``->createMock`` or ``->createPartialMock`` methods. -.. warning:: Using this rule is risky. +Warning +------- - Risky when PHPUnit classes are overridden or not accessible, or when project - has PHPUnit incompatibilities. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when PHPUnit classes are overridden or not accessible, or when project has +PHPUnit incompatibilities. Configuration ------------- diff --git a/doc/rules/php_unit/php_unit_mock_short_will_return.rst b/doc/rules/php_unit/php_unit_mock_short_will_return.rst index 219d14add01..f30315f0a69 100644 --- a/doc/rules/php_unit/php_unit_mock_short_will_return.rst +++ b/doc/rules/php_unit/php_unit_mock_short_will_return.rst @@ -5,10 +5,14 @@ Rule ``php_unit_mock_short_will_return`` Usage of PHPUnit's mock e.g. ``->will($this->returnValue(..))`` must be replaced by its shorter equivalent such as ``->willReturn(...)``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when PHPUnit classes are overridden or not accessible, or when project - has PHPUnit incompatibilities. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when PHPUnit classes are overridden or not accessible, or when project has +PHPUnit incompatibilities. Examples -------- diff --git a/doc/rules/php_unit/php_unit_namespaced.rst b/doc/rules/php_unit/php_unit_namespaced.rst index c4ad4aac0ef..a578e1f708c 100644 --- a/doc/rules/php_unit/php_unit_namespaced.rst +++ b/doc/rules/php_unit/php_unit_namespaced.rst @@ -18,10 +18,14 @@ Extended forward compatibility layer (``PHPUnit\Framework\Assert``, classes) was introduced in v5.7.0. -.. warning:: Using this rule is risky. +Warning +------- - Risky when PHPUnit classes are overridden or not accessible, or when project - has PHPUnit incompatibilities. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when PHPUnit classes are overridden or not accessible, or when project has +PHPUnit incompatibilities. Configuration ------------- diff --git a/doc/rules/php_unit/php_unit_no_expectation_annotation.rst b/doc/rules/php_unit/php_unit_no_expectation_annotation.rst index efe5eabd782..79ab084f2e3 100644 --- a/doc/rules/php_unit/php_unit_no_expectation_annotation.rst +++ b/doc/rules/php_unit/php_unit_no_expectation_annotation.rst @@ -5,10 +5,14 @@ Rule ``php_unit_no_expectation_annotation`` Usages of ``@expectedException*`` annotations MUST be replaced by ``->setExpectedException*`` methods. -.. warning:: Using this rule is risky. +Warning +------- - Risky when PHPUnit classes are overridden or not accessible, or when project - has PHPUnit incompatibilities. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when PHPUnit classes are overridden or not accessible, or when project has +PHPUnit incompatibilities. Configuration ------------- diff --git a/doc/rules/php_unit/php_unit_set_up_tear_down_visibility.rst b/doc/rules/php_unit/php_unit_set_up_tear_down_visibility.rst index 3c645d110ba..b2555a0ef8a 100644 --- a/doc/rules/php_unit/php_unit_set_up_tear_down_visibility.rst +++ b/doc/rules/php_unit/php_unit_set_up_tear_down_visibility.rst @@ -5,10 +5,14 @@ Rule ``php_unit_set_up_tear_down_visibility`` Changes the visibility of the ``setUp()`` and ``tearDown()`` functions of PHPUnit to ``protected``, to match the PHPUnit TestCase. -.. warning:: Using this rule is risky. +Warning +------- - This fixer may change functions named ``setUp()`` or ``tearDown()`` outside - of PHPUnit tests, when a class is wrongly seen as a PHPUnit test. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +This fixer may change functions named ``setUp()`` or ``tearDown()`` outside of +PHPUnit tests, when a class is wrongly seen as a PHPUnit test. Examples -------- diff --git a/doc/rules/php_unit/php_unit_strict.rst b/doc/rules/php_unit/php_unit_strict.rst index 3908c9dc7f9..dc5461608f4 100644 --- a/doc/rules/php_unit/php_unit_strict.rst +++ b/doc/rules/php_unit/php_unit_strict.rst @@ -4,10 +4,13 @@ Rule ``php_unit_strict`` PHPUnit methods like ``assertSame`` should be used instead of ``assertEquals``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when any of the functions are overridden or when testing object - equality. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when any of the functions are overridden or when testing object equality. Configuration ------------- diff --git a/doc/rules/php_unit/php_unit_test_annotation.rst b/doc/rules/php_unit/php_unit_test_annotation.rst index d8f66ca7a8c..b3b1ee8520b 100644 --- a/doc/rules/php_unit/php_unit_test_annotation.rst +++ b/doc/rules/php_unit/php_unit_test_annotation.rst @@ -4,10 +4,14 @@ Rule ``php_unit_test_annotation`` Adds or removes @test annotations from tests, following configuration. -.. warning:: Using this rule is risky. +Warning +------- - This fixer may change the name of your tests, and could cause incompatibility - with abstract classes or interfaces. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +This fixer may change the name of your tests, and could cause incompatibility +with abstract classes or interfaces. Configuration ------------- diff --git a/doc/rules/php_unit/php_unit_test_case_static_method_calls.rst b/doc/rules/php_unit/php_unit_test_case_static_method_calls.rst index aced0e55550..106ed7b8d74 100644 --- a/doc/rules/php_unit/php_unit_test_case_static_method_calls.rst +++ b/doc/rules/php_unit/php_unit_test_case_static_method_calls.rst @@ -5,10 +5,14 @@ Rule ``php_unit_test_case_static_method_calls`` Calls to ``PHPUnit\Framework\TestCase`` static methods must all be of the same type, either ``$this->``, ``self::`` or ``static::``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when PHPUnit methods are overridden or not accessible, or when project - has PHPUnit incompatibilities. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when PHPUnit methods are overridden or not accessible, or when project has +PHPUnit incompatibilities. Configuration ------------- diff --git a/doc/rules/strict/declare_strict_types.rst b/doc/rules/strict/declare_strict_types.rst index 7b3660ba96e..a4c31afc408 100644 --- a/doc/rules/strict/declare_strict_types.rst +++ b/doc/rules/strict/declare_strict_types.rst @@ -4,9 +4,13 @@ Rule ``declare_strict_types`` Force strict types declaration in all files. Requires PHP >= 7.0. -.. warning:: Using this rule is risky. +Warning +------- - Forcing strict types will stop non strict code from working. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Forcing strict types will stop non strict code from working. Examples -------- diff --git a/doc/rules/strict/strict_comparison.rst b/doc/rules/strict/strict_comparison.rst index d899ca3079a..819912b7ad7 100644 --- a/doc/rules/strict/strict_comparison.rst +++ b/doc/rules/strict/strict_comparison.rst @@ -4,9 +4,13 @@ Rule ``strict_comparison`` Comparisons should be strict. -.. warning:: Using this rule is risky. +Warning +------- - Changing comparisons to strict might change code behavior. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Changing comparisons to strict might change code behavior. Examples -------- diff --git a/doc/rules/strict/strict_param.rst b/doc/rules/strict/strict_param.rst index bd827f69745..27040b2688b 100644 --- a/doc/rules/strict/strict_param.rst +++ b/doc/rules/strict/strict_param.rst @@ -10,10 +10,14 @@ Description The functions "array_keys", "array_search", "base64_decode", "in_array" and "mb_detect_encoding" should be used with $strict param. -.. warning:: Using this rule is risky. +Warning +------- - Risky when the fixed function is overridden or if the code relies on - non-strict usage. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when the fixed function is overridden or if the code relies on non-strict +usage. Examples -------- diff --git a/doc/rules/string_notation/no_trailing_whitespace_in_string.rst b/doc/rules/string_notation/no_trailing_whitespace_in_string.rst index 0fbda43011e..bdb322f87a7 100644 --- a/doc/rules/string_notation/no_trailing_whitespace_in_string.rst +++ b/doc/rules/string_notation/no_trailing_whitespace_in_string.rst @@ -4,10 +4,13 @@ Rule ``no_trailing_whitespace_in_string`` There must be no trailing whitespace in strings. -.. warning:: Using this rule is risky. +Warning +------- - Changing the whitespaces in strings might affect string comparisons and - outputs. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Changing the whitespaces in strings might affect string comparisons and outputs. Examples -------- diff --git a/doc/rules/string_notation/string_length_to_empty.rst b/doc/rules/string_notation/string_length_to_empty.rst index 61c6e07d915..d1b4dd7e09a 100644 --- a/doc/rules/string_notation/string_length_to_empty.rst +++ b/doc/rules/string_notation/string_length_to_empty.rst @@ -4,10 +4,14 @@ Rule ``string_length_to_empty`` String tests for empty must be done against ``''``, not with ``strlen``. -.. warning:: Using this rule is risky. +Warning +------- - Risky when ``strlen`` is overridden, when called using a ``stringable`` - object, also no longer triggers warning when called using non-string(able). +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Risky when ``strlen`` is overridden, when called using a ``stringable`` object, +also no longer triggers warning when called using non-string(able). Examples -------- diff --git a/doc/rules/string_notation/string_line_ending.rst b/doc/rules/string_notation/string_line_ending.rst index 5f9c7fb9754..ab3ee33414f 100644 --- a/doc/rules/string_notation/string_line_ending.rst +++ b/doc/rules/string_notation/string_line_ending.rst @@ -4,10 +4,14 @@ Rule ``string_line_ending`` All multi-line strings must use correct line ending. -.. warning:: Using this rule is risky. +Warning +------- - Changing the line endings of multi-line strings might affect string - comparisons and outputs. +Using this rule is risky +~~~~~~~~~~~~~~~~~~~~~~~~ + +Changing the line endings of multi-line strings might affect string comparisons +and outputs. Examples --------