| Total Complexity | 3 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class CallableGenerator |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var ContainerInterface |
||
| 16 | */ |
||
| 17 | private $serviceContainer; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param ContainerInterface $serviceContainer |
||
| 21 | */ |
||
| 22 | public function __construct($serviceContainer) |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Generate the arrays used for call_user_func_array |
||
| 29 | * |
||
| 30 | * @param array $arrayCallable |
||
| 31 | * @param $entity |
||
| 32 | * |
||
| 33 | * @param $changedProperties |
||
| 34 | * |
||
| 35 | * @return array |
||
| 36 | */ |
||
| 37 | public function generateCallable(array $arrayCallable = [], $entity, $changedProperties = null) |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Generate the signature of a callback to ensure that each callback for the same entity is only called once |
||
| 55 | * |
||
| 56 | * @param array $arrayCallable |
||
| 57 | * @param $entity |
||
| 58 | * |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | private function generateCallableSignature(array $arrayCallable = [], $entity) |
||
| 66 |