rspec/rules/S3358/php/noncompliant.adoc
Fred Tingaud a3f81b0b6c
Modify rule S3358: LaYC for Nested ternaries
Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com>
2023-06-14 08:47:35 +00:00

7 lines
175 B
Plaintext

[source,php]
----
function get_readable_status($is_running, $has_errors) {
return $is_running ? "Running" : ($has_errors ? "Failure" : "Succeeded"); // Noncompliant
}
----