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 18:08:03 +02:00
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
2022-02-04 17:28:24 +01:00
[source,php]
2021-04-28 16:49:39 +02:00
----
function f(?int param) {}
f();
----
2021-04-28 18:08:03 +02:00
2021-04-28 16:49:39 +02:00
== Compliant Solution
2022-02-04 17:28:24 +01:00
[source,php]
2021-04-28 16:49:39 +02:00
----
function f(?int param) {}
f(0);
----
2021-04-28 18:08:03 +02:00
2021-06-08 14:23:48 +02:00
ifdef::env-github,rspecator-view[]
2021-06-08 15:52:13 +02:00
'''
2021-06-08 14:23:48 +02:00
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]