| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 2 | public function __construct($messageLength, $dialogId, $messageNumber) |
|
| 27 | { |
||
| 28 | 2 | if (strlen($messageLength) != 12) { |
|
| 29 | 2 | $messageLength = str_pad((int) $messageLength + static::HEADER_LENGTH + strlen($dialogId) + strlen($messageNumber), 12, '0', STR_PAD_LEFT); |
|
| 30 | 2 | } |
|
| 31 | |||
| 32 | 2 | parent::__construct( |
|
| 33 | 2 | static::NAME, |
|
| 34 | 2 | 1, // always the first segment |
|
| 35 | 2 | static::VERSION, |
|
| 36 | array( |
||
| 37 | 2 | $messageLength, |
|
| 38 | 2 | 300, // HBCI / FINTS version 3.0, |
|
| 39 | 2 | $dialogId, |
|
| 40 | 2 | $messageNumber, |
|
| 41 | ) |
||
| 42 | 2 | ); |
|
| 43 | 2 | } |
|
| 44 | |||
| 53 |