29 lines
566 B
Plaintext
29 lines
566 B
Plaintext
include::../description.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,php]
|
|
----
|
|
function makeyogurt($type = "acidophilus", $flavor){...} // Noncompliant
|
|
|
|
makeyogurt("raspberry")}} // Runtime error: Missing argument 2 in call to makeyogurt()
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
[source,php]
|
|
----
|
|
function makeyogurt($flavor, $type = "acidophilus", ){...}
|
|
|
|
makeyogurt("raspberry")}} // Works as expected
|
|
----
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|