-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Typo #1357
Typo #1357
Conversation
@umpirsky needs rebase :p |
@jjanvier Rebased. |
|
||
foreach ($container->findTaggedServiceIds('sylius.promotion_action') as $id => $attributes) { | ||
$checkers[$attributes[0]['type']] = $attributes[0]['label']; | ||
$actions[$attributes[0]['type']] = $attributes[0]['label']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix indent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also to prevent notices, please add simple validation:
if (!isset($attributes[0]['type'])) {
throw new \InvalidArgumentException('Tagged promotion action needs to have `type` attribute.');
}
if (!isset($attributes[0]['label'])) {
throw new \InvalidArgumentException('Tagged promotion action needs to have `label` attribute.');
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is no need. Since it can happen only because of bad config, which is usually during development. But I added them.
Thanks Sasha! |
No description provided.