Update the code standards
This commit is contained in:
+9
-5
@@ -20,9 +20,12 @@ namespace Foo\Bar\Controller;
|
|||||||
|
|
||||||
use Foo\Bar\Bar;
|
use Foo\Bar\Bar;
|
||||||
|
|
||||||
class Foo extends Bar {
|
class Foo extends Bar
|
||||||
public function baz() {
|
{
|
||||||
if ($condition) {
|
public function baz()
|
||||||
|
{
|
||||||
|
if ($condition)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -32,11 +35,12 @@ class Foo extends Bar {
|
|||||||
- At least one newline seperating `namespace`, `use`, and `class` declarations
|
- At least one newline seperating `namespace`, `use`, and `class` declarations
|
||||||
- Spaces around operators, loops, conditions and control blocks:
|
- Spaces around operators, loops, conditions and control blocks:
|
||||||
```php
|
```php
|
||||||
if ($condition === (10 + 2)) {
|
if ($condition === (10 + 2))
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
- Braces on the same line. The exception to this rule is for long conditions.
|
- Braces on a new line.
|
||||||
- Line lengths have a soft 80 limit and hard 120 length.
|
- Line lengths have a soft 80 limit and hard 120 length.
|
||||||
- PHP constants should be in lowercase; `true`, `false` and `null`.
|
- PHP constants should be in lowercase; `true`, `false` and `null`.
|
||||||
- Defined constants should always be in uppercase.
|
- Defined constants should always be in uppercase.
|
||||||
|
|||||||
Reference in New Issue
Block a user