Skip to content
Permalink
Browse files

[generate:event:subscriber] Added coding standard (#4076)

  • Loading branch information...
harold20 authored and enzolutions committed Jun 3, 2019
1 parent 918a883 commit 6af1543f914bfdec29497441783704eb0ef7483a
@@ -37,9 +37,10 @@ public function eventsQuestion()
}
$callbackSuggestion = str_replace('.', '_', $event);
$callback = $this->getIo()->ask(
$this->trans('commands.generate.event.subscriber.questions.callback-name'),
$callbackSuggestion
$this->stringConverter->underscoreToCamelCase($callbackSuggestion)
);
$eventCollection[$event] = $callback;
@@ -23,6 +23,7 @@ use {{ service.class }};
* @var \{{ service.class }}
*/
protected ${{service.camel_case_name}};
{% endfor %}
{% endif %}
{% endblock %}
@@ -40,10 +40,10 @@ class {{ class }} implements EventSubscriberInterface {% endblock %}

return $events;
}

{% for event_name, callback in events %}

/**
* This method is called whenever the {{ event_name }} event is dispatched.
* This method is called when the {{ event_name }} is dispatched.
*
* @param \Symfony\Component\EventDispatcher\Event $event
* The dispatched event.

0 comments on commit 6af1543

Please sign in to comment.
You can’t perform that action at this time.