| Total Complexity | 3 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types = 1); |
||
| 10 | class CallableGenerator |
||
| 11 | { |
||
| 12 | private ServiceLocator $serviceLocator; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param ServiceLocator $serviceContainer |
||
| 16 | */ |
||
| 17 | public function __construct(ServiceLocator $serviceContainer) |
||
| 18 | { |
||
| 19 | $this->serviceLocator = $serviceContainer; |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Generate the arrays used for call_user_func_array |
||
| 24 | * |
||
| 25 | * @param array $arrayCallable |
||
| 26 | * @param $entity |
||
| 27 | * |
||
| 28 | * @param $changedProperties |
||
| 29 | * |
||
| 30 | * @return array |
||
| 31 | */ |
||
| 32 | public function generateCallable(array $arrayCallable = [], $entity, $changedProperties = null): array |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Generate the signature of a callback to ensure that each callback for the same entity is only called once |
||
| 50 | * |
||
| 51 | * @param array $arrayCallable |
||
| 52 | * @param $entity |
||
| 53 | * |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | private function generateCallableSignature(array $arrayCallable = [], $entity): string |
||
| 59 | } |
||
| 60 | } |
||
| 61 |