rspec/rules/S6035/php/rule.adoc
Nils Werner 37e48b527c
Modify rule S6035: Add Python as covered language (#541)
* Modify rule S6035: Add Python as covered language

* Modify rule S6035: Fix description for python and php
2021-10-29 08:27:24 +00:00

16 lines
242 B
Plaintext

include::../description_without_reference_to_s5998.adoc[]
== Noncompliant Code Example
----
preg_match("/a|b|c/", $str); // Noncompliant
----
== Compliant Solution
----
preg_match("/[abc]/", $str);
// or
preg_match("/[a-c]/", $str);
----