65 lines
853 B
Plaintext
65 lines
853 B
Plaintext
== Why is this an issue?
|
|
|
|
include::../description.adoc[]
|
|
|
|
=== Noncompliant code example
|
|
|
|
With the default regular expression ``++^[a-z_][a-zA-Z0-9_]*$++``:
|
|
|
|
[source,php]
|
|
----
|
|
public function doSomething($myParam){
|
|
$LOCAL;
|
|
...
|
|
}
|
|
|
|
public function do_something_else($my_param){
|
|
$LOCAL;
|
|
...
|
|
}
|
|
----
|
|
|
|
=== Compliant solution
|
|
|
|
[source,php]
|
|
----
|
|
public function doSomething($myParam){
|
|
$local;
|
|
...
|
|
}
|
|
|
|
public function do_something_else($my_param){
|
|
$local;
|
|
...
|
|
}
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
=== Parameters
|
|
|
|
.format
|
|
****
|
|
|
|
----
|
|
^[a-z_][a-zA-Z0-9_]*$
|
|
----
|
|
|
|
Regular expression used to check the names against.
|
|
****
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|