Skip to content

Commit fa31cb1

Browse files
Fixed examples
Fixed syntax errors in examples
1 parent edd83fb commit fa31cb1

File tree

1 file changed

+3
-0
lines changed
  • general/development/policies/codingstyle

1 file changed

+3
-0
lines changed

general/development/policies/codingstyle/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,10 +1170,12 @@ All arguments to a function should be explicitly listed out and defined with a t
11701170
context $context = null,
11711171
array $options = [],
11721172
): string;
1173+
```
11731174
</InvalidExample>
11741175

11751176
If arguments are optional, then they should be marked appropriately as optional with a default value.
11761177
<ValidExample>
1178+
```php
11771179
function goodfunction(
11781180
string $text,
11791181
?context $context = null,
@@ -1186,6 +1188,7 @@ If arguments are optional, then they should be marked appropriately as optional
11861188
bool $blanktarget = false,
11871189
bool $allowid = false,
11881190
): string;
1191+
```
11891192
</ValidExample>
11901193

11911194
If there was a very good reason, then the use of an array could be considered. But it is strongly encouraged that all parameters be explict and typed.

0 commit comments

Comments
 (0)