Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
13 | 1 | public function __invoke(Container $container, array $pointcuts) : string |
|
14 | { |
||
15 | 1 | $log = []; |
|
16 | 1 | $contaier = unserialize(serialize($container)); |
|
17 | 1 | $spy = new SpyCompiler; |
|
18 | 1 | foreach ($contaier->getContainer() as $dependencyIndex => $dependency) { |
|
19 | 1 | if ($dependency instanceof Dependency) { |
|
20 | 1 | $dependency->weaveAspects($spy, $pointcuts); |
|
21 | } |
||
22 | 1 | $log[] = sprintf( |
|
23 | 1 | '%s => %s', |
|
24 | 1 | $dependencyIndex, |
|
25 | 1 | (string) $dependency |
|
26 | ); |
||
27 | } |
||
28 | 1 | sort($log); |
|
29 | |||
30 | 1 | return implode(PHP_EOL, $log); |
|
31 | } |
||
32 | } |
||
33 |