-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad code sample #22
Comments
Yes sorry it's the |
I usually put |
Would you mind sending a quick PR for this? |
Well, I don't know what the code sample was supposed to look like ;-) What I mean is, just comment-out the irrelevant parts, so if you have: return array(
'foo' => 1,
'bar' => 2,
'baz' => 3,
); But the example deals only with return array(
// ...
'baz' => 3,
); But preserve context (parens, nesting, identation etc.) so that it's still valid PHP, so it illustrates where the relevant parts would appear :-) |
I think maybe just adding the other arrays above it but empty would make it clearer, like: hooks.php <?php return [
'before' => [],
'after' => [
// The curent example
],
'custom' => [],
]; What do you think? |
The first sample on this page isn't valid PHP code. Looks like half an array? Pretty confusing.
The text was updated successfully, but these errors were encountered: