rspec/rules/S2002/php/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

44 lines
910 B
Plaintext

== Why is this an issue?
Just as pain is your body's way of telling you something is wrong, errors are PHP's way of telling you there's something you need to fix. Neither pain, nor PHP errors should be ignored.
=== Noncompliant code example
[source,php]
----
@doSomethingDangerous($password); // Noncompliant; '@' silences errors from function call
----
=== Compliant solution
[source,php]
----
doSomethingDangerous($password);
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Remove the '@' symbol from this function call to un-silence errors.
'''
== Comments And Links
(visible only on this page)
=== relates to: S2486
=== on 17 Sep 2014, 11:31:27 Freddy Mallet wrote:
@ann, I would increase the SQALE remediation cost, as the remediation action should lead to take into account errors.
endif::env-github,rspecator-view[]