| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | public function create(string $className, string $name, array $config): IExtensionAdapter |
||
| 39 | { |
||
| 40 | if (!is_subclass_of($className, IExtensionAdapter::class, TRUE)) { |
||
| 41 | throw new SixtyEightPublishers\User\Common\Exception\InvalidArgumentException(sprintf( |
||
| 42 | 'Passed classname must be implementor of %s interface', |
||
| 43 | IExtensionAdapter::class |
||
| 44 | )); |
||
| 45 | } |
||
| 46 | |||
| 47 | return new ExtensionAdapterProxy(function () use ($className, $name, $config) { |
||
| 48 | return new $className($this->builder, $name, $config, $this->sharedData); |
||
| 49 | }); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |