rspec/rules/S1848/php/rule.adoc

38 lines
509 B
Plaintext

== Why is this an issue?
include::../description.adoc[]
=== Noncompliant code example
[source,php]
----
if ($x < 0) {
new foo; // Noncompliant
}
----
=== Compliant solution
[source,php]
----
$var = NULL;
if ($x < 0) {
$var = new foo;
}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]