rspec/rules/S5996/php/rule.adoc

25 lines
418 B
Plaintext
Raw Normal View History

include::../description.adoc[]
== Noncompliant Code Example
----
// This can never match because $ and ^ have been switched around
preg_match("/$[a-z]+^/", $str); // Noncompliant
----
== Compliant Solution
----
preg_match("/^[a-z]+$/", $str);
----
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]