rspec/rules/S122/php/rule.adoc

35 lines
656 B
Plaintext
Raw Normal View History

== Why is this an issue?
2020-06-30 10:16:44 +02:00
include::../description.adoc[]
include::../noncompliant.adoc[]
include::../compliant.adoc[]
=== Exceptions
2020-06-30 10:16:44 +02:00
Anonymous functions containing a single statement are ignored.
2021-02-02 15:02:10 +01:00
2020-06-30 10:16:44 +02:00
----
$max_comparator = function ($v) { return $v > 2; }; // Compliant
$max_comparator = function ($v) { echo $v; return $v > 2; }; // Noncompliant
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../highlighting.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]