rspec/rules/S3772/php/rule.adoc

20 lines
348 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.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
function f(?int param) {}
f();
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
function f(?int param) {}
f(0);
----