| @@ 82-91 (lines=10) @@ | ||
| 79 | return $eloquentStoredEvent->toStoredEvent(); |
|
| 80 | } |
|
| 81 | ||
| 82 | private function getEventClass(string $class): string |
|
| 83 | { |
|
| 84 | $map = config('event-projector.event_class_map', []); |
|
| 85 | ||
| 86 | if (! empty($map) && in_array($class, $map)) { |
|
| 87 | return array_search($class, $map, true); |
|
| 88 | } |
|
| 89 | ||
| 90 | return $class; |
|
| 91 | } |
|
| 92 | } |
|
| 93 | ||
| @@ 88-97 (lines=10) @@ | ||
| 85 | return Arr::get(config('event-projector.event_class_map', []), $class, $class); |
|
| 86 | } |
|
| 87 | ||
| 88 | protected static function getEventClass(string $class): string |
|
| 89 | { |
|
| 90 | $map = config('event-projector.event_class_map', []); |
|
| 91 | ||
| 92 | if (! empty($map) && in_array($class, $map)) { |
|
| 93 | return array_search($class, $map, true); |
|
| 94 | } |
|
| 95 | ||
| 96 | return $class; |
|
| 97 | } |
|
| 98 | } |
|
| 99 | ||