include::../common/introduction.adoc[]

== Why is this an issue?

include::../common/why-is-this-an-issue.adoc[]

include::../common/rule-behaviour.adoc[]

=== What is the potential impact?

include::../common/what-is-the-potential-impact.adoc[]

== How to fix it

include::../common/how-to-fix-it.adoc[]

=== Code examples

==== Noncompliant code example

The following example assumes that constant names should match the default
regular expression ``++^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$++``:

[source,php,diff-id=1,diff-type=noncompliant]
----
define("const1", true);

class Foo {
    const const2 = "bar";
}
----

==== Compliant solution

[source,php,diff-id=1,diff-type=compliant]
----
define("CONST1", true);

class Foo {
    const CONST2 = "bar";
}
----

== Resources

=== External coding guidelines

* https://www.php-fig.org/psr/psr-1/[The PSR-1: Basic Coding Standard]

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

include::../common/message.adoc[]

include::../common/parameters.adoc[]

'''
== Comments And Links
(visible only on this page)

include::../common/comments-and-links.adoc[]

endif::env-github,rspecator-view[]
