Commit 1c668429 authored by Charl's avatar Charl
Browse files

Added Markup Fixes

parent 409dfc83
......@@ -413,7 +413,7 @@ In the argument list and variable list, there MUST NOT be a space before each co
Closure arguments with default values MUST go at the end of the argument list.
A closure declaration looks like the following. Note the placement of parentheses, commas, spaces, and braces:
```php
<?php
$closureWithArgs = function ($arg1, $arg2) {
// body
......@@ -422,6 +422,8 @@ $closureWithArgs = function ($arg1, $arg2) {
$closureWithArgsAndVars = function ($arg1, $arg2) use ($var1, $var2) {
// body
};
```
Argument lists and variable lists MAY be split across multiple lines, where each subsequent line is indented once.
When doing so, the first item in the list MUST be on the next line, and there MUST be only one argument or variable per line.
......@@ -479,6 +481,7 @@ $shortArgs_longVars = function ($arg) use (
```
Note that the formatting rules also apply when the closure is used directly in a function or method call as an argument.
Example...
```php
<?php
......@@ -593,8 +596,6 @@ use Vendor\Package\ClassName;
// rest of PHP code
```
###
## 99. End Of File
To make life easier with tabs, files must contain
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment