| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 18 | public function proceed(MethodInvocation $invocation) |
||
| 19 | { |
||
| 20 | $t = microtime(true); |
||
| 21 | $result = $invocation->proceed(); |
||
| 22 | $time = microtime(true) - $t; |
||
| 23 | $spyLog = new SpyLog; |
||
| 24 | list( |
||
| 25 | $spyLog->class, |
||
| 26 | $spyLog->method, |
||
| 27 | $spyLog->arguments, |
||
| 28 | $spyLog->result, |
||
| 29 | $spyLog->time |
||
| 30 | ) = [ |
||
| 31 | (new \ReflectionClass($invocation->getThis()))->getParentClass()->getName(), |
||
| 32 | $invocation->getMethod()->getName(), |
||
| 33 | $invocation->getArguments()->getArrayCopy(), |
||
| 34 | $result, |
||
| 35 | $time |
||
| 36 | ]; |
||
| 37 | $this->logs[$spyLog->class][$spyLog->method][] = $spyLog; |
||
| 38 | |||
| 39 | return $result; |
||
| 40 | } |
||
| 57 |