| @@ 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 | ||
| @@ 67-76 (lines=10) @@ | ||
| 64 | return $storedEvent->toStoredEventData(); |
|
| 65 | } |
|
| 66 | ||
| 67 | private static function getEventClass(string $class): string |
|
| 68 | { |
|
| 69 | $map = config('event-projector.event_class_map', []); |
|
| 70 | ||
| 71 | if (! empty($map) && in_array($class, $map)) { |
|
| 72 | return array_search($class, $map, true); |
|
| 73 | } |
|
| 74 | ||
| 75 | return $class; |
|
| 76 | } |
|
| 77 | } |
|
| 78 | ||