Conditions | 4 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4.3244 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | 1 | public function stamp(StampingCommand $command): StampingResult |
|
26 | { |
||
27 | 1 | $soapCaller = $this->settings()->createCallerForService(Services::stamping()); |
|
28 | // Finkok, repeat to fix bad webservice behavior of remote stamp method |
||
29 | // This will not be fixed according to Finkok |
||
30 | do { |
||
31 | 1 | $rawResponse = $soapCaller->call('stamp', [ |
|
32 | 1 | 'xml' => $command->xml(), |
|
33 | ]); |
||
34 | 1 | $result = new StampingResult('stampResult', $rawResponse); |
|
35 | 1 | if (null !== $result->alerts()->findByErrorCode('307') && '' === $result->uuid()) { |
|
|
|||
36 | usleep(200000); // 0.2 seconds |
||
37 | continue; |
||
38 | } |
||
39 | 1 | break; |
|
40 | } while (true); |
||
41 | 1 | return $result; |
|
42 | } |
||
44 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.