Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
49 | protected function parseMotiveParts(StdClass $data) |
||
50 | { |
||
51 | $motive = str_pad(trim($data->motive), 8, 0, STR_PAD_LEFT); |
||
52 | |||
53 | if (in_array($data->occurrenceCode, Itau::OCCURRENCES_ERROR)) { |
||
54 | return str_split($motive, 2); |
||
55 | } |
||
56 | |||
57 | if ($this->hasOtherMotive($data)) { |
||
58 | return [$data->otherMotive]; |
||
59 | } |
||
60 | |||
61 | return [$motive]; |
||
62 | } |
||
63 | } |
||
64 |