rspec/rules/S3772/php/rule.adoc

16 lines
344 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
When a function parameter has a nullable type, e.g., parameter ``++param++`` in ``++f(?int param)++``, it must be explicitly provided in every function call. A nullable-type parameter has no default value.
== Noncompliant Code Example
----
function f(?int param) {}
f();
----
== Compliant Solution
----
function f(?int param) {}
f(0);
----