| Total Complexity | 5 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | class UserEventResolver extends UserAwareComponent implements EventResolverInterface |
||
| 21 | { |
||
| 22 | private $commands = array(); |
||
| 23 | |||
| 24 | private $default; |
||
| 25 | |||
| 26 | public function __construct() |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param Event $event |
||
| 35 | * @param $eventName |
||
| 36 | * |
||
| 37 | * @return array |
||
| 38 | */ |
||
| 39 | #[\Override] |
||
| 40 | public function getEventLogInfo(Event $event, $eventName) |
||
| 41 | { |
||
| 42 | $this->default = array( |
||
| 43 | 'type' => $eventName, |
||
| 44 | 'description' => $eventName, |
||
| 45 | ); |
||
| 46 | |||
| 47 | if (!isset($this->commands[$eventName])) { |
||
| 48 | return $this->default; |
||
| 49 | } |
||
| 50 | |||
| 51 | return $this->getEventLogDetails($event, $this->commands[$eventName]); |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param Event $event |
||
| 56 | * @param ResolverCommand $command |
||
| 57 | * |
||
| 58 | * @return array |
||
| 59 | */ |
||
| 60 | protected function getEventLogDetails(Event $event, ResolverCommand $command) |
||
| 65 | } |
||
| 66 | } |
||
| 67 |