rspec/rules/S3973/php/rule.adoc

31 lines
307 B
Plaintext
Raw Normal View History

2020-06-30 12:48:39 +02:00
include::../description.adoc[]
== Noncompliant Code Example
----
if ($x > 0) // Noncompliant
doTheThing();
doTheOtherThing();
foo();
----
== Compliant Solution
----
if ($x > 0) {
doTheThing();
doTheOtherThing();
}
foo();
----
or
----
if ($x > 0)
doTheThing();
doTheOtherThing();
foo();
----