diff --git a/spec.md b/spec.md index 4e8f456..761d008 100644 --- a/spec.md +++ b/spec.md @@ -513,12 +513,12 @@ function fooBarBaz($arg1, &$arg2, $arg3 = []) } ``` -### 4.5 Method and Function Arguments +### 4.5 Method and Function Parameters In the argument list, there MUST NOT be a space before each comma, and there MUST be one space after each comma. -Method and function arguments with default values MUST go at the end of the argument +Method and function parameters with default values MUST go at the end of the argument list. ```php @@ -714,6 +714,13 @@ $app->get('/hello/{name}', function ($name) use ($app) { }); ``` +If using named arguments, there MUST NOT be a space between the argument name +and colon, and there MUST be a single space between the colon and the argument value. + +```php +somefunction($a, b: $b, c: 'c'); +``` + Method chaining MAY be put on separate lines, where each subsequent line is indented once. When doing so, the first method MUST be on the next line.