| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public static function getActionClass(string $actionName, string $actionClass): object |
||
| 10 | { |
||
| 11 | $configuredClass = config("email-campaigns.actions.{$actionName}"); |
||
| 12 | |||
| 13 | if (! is_a($configuredClass, $actionClass, true)) { |
||
| 14 | throw InvalidConfig::invalidAction($actionName, $configuredClass ?? '', $actionClass); |
||
| 15 | } |
||
| 16 | |||
| 17 | return app($configuredClass); |
||
| 18 | } |
||
| 19 | } |
||
| 20 |