Conditions | 4 |
Paths | 4 |
Total Lines | 22 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Comodojo\Extender\Transformers; |
||
8 | public function transform (Worklog $worklog) { |
||
9 | |||
10 | $parameters = $worklog->getParameters()->export(); |
||
11 | if ( isset($parameters['parent']) && $parameters['parent'] instanceof \Comodojo\Extender\Task\Result ) { |
||
12 | $parameters['parent'] = $parameters['parent']->export(); |
||
13 | } |
||
14 | |||
15 | $jid = $worklog->getJid(); |
||
16 | |||
17 | return [ |
||
18 | 'id' => (int) $worklog->getId(), |
||
19 | 'name' => $worklog->getName(), |
||
20 | 'uid' => $worklog->getUid(), |
||
21 | 'pid' => $worklog->getPid(), |
||
22 | 'jid' => empty($jid) ? null : $jid->getId(), |
||
|
|||
23 | 'parent_uid' => $worklog->getParentUid(), |
||
24 | 'task' => $worklog->getTask(), |
||
25 | 'parameters' => $parameters, |
||
26 | 'status' => $worklog->getStatus(), |
||
27 | 'result' => $worklog->getResult(), |
||
28 | 'start_time' => $worklog->getStartTime(), |
||
29 | 'end_time' => $worklog->getEndTime() |
||
30 | ]; |
||
35 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.