Commit 44529486 by tom--

style guide examples should follow its own rules

example code suffering from a double case of else-after-return simplified according to the subsequent rule
parent fbb11e18
......@@ -251,11 +251,12 @@ $config = [
```php
if ($event === null) {
return new Event();
} elseif ($event instanceof CoolEvent) {
}
if ($event instanceof CoolEvent) {
return $event->instance();
} else {
return null;
}
return null;
// the following is NOT allowed:
if (!$model && null === $event)
......
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