
Co-authored-by: Fred Tingaud <95592999+frederic-tingaud-sonarsource@users.noreply.github.com>
46 lines
776 B
Plaintext
46 lines
776 B
Plaintext
== Why is this an issue?
|
|
|
|
include::../description.adoc[]
|
|
|
|
Using the regular expression ``++^[a-z][a-zA-Z0-9]*$++``, the noncompliant code below:
|
|
|
|
[source,php,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
class MyClass {
|
|
$my_field;
|
|
}
|
|
----
|
|
|
|
Should be replaced with:
|
|
|
|
[source,php,diff-id=1,diff-type=compliant]
|
|
----
|
|
class MyClass {
|
|
$myField;
|
|
}
|
|
----
|
|
|
|
== Resources
|
|
|
|
=== Documentation
|
|
|
|
* Wikipedia - https://en.wikipedia.org/wiki/Naming_convention_(programming)[Naming Convention (programming)]
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
include::../parameters.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|