rspec/rules/S116/php/rule.adoc
Angelo Buono febb2d2152
Modify rule S116: Migrate to LayC - Field names should comply with a naming convention (#3266)
Co-authored-by: Fred Tingaud <95592999+frederic-tingaud-sonarsource@users.noreply.github.com>
2023-10-13 10:06:09 +02:00

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[]