Skip to content

Commit f90f9f4

Browse files
Update general/development/policies/codingstyle/index.md
Co-authored-by: Andrew Lyons <[email protected]>
1 parent e3e4232 commit f90f9f4

File tree

1 file changed

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

1 file changed

+13
-0
lines changed

general/development/policies/codingstyle/index.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,19 @@ function goodfunction(
11961196

11971197
</ValidExample>
11981198

1199+
Alternatively a dedicated options class may be used - for example:
1200+
1201+
<ValidExample>
1202+
1203+
```php
1204+
public function good_function(
1205+
string $text,
1206+
?context $context = null,
1207+
filter_options $options = null,
1208+
): string;
1209+
1210+
</ValidExample>
1211+
11991212
:::note
12001213

12011214
Whilst the use of explicitly specified options, or a dedicated options class, is strongly encouraged; this may not be possible in all cases. Where a generic options array is used, this should be discussed and the reason clearly explained.

0 commit comments

Comments
 (0)