| Total Complexity | 5 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Btrl extends Engine |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * |
||
| 11 | * {@inheritdoc} |
||
| 12 | * @see \Kingsquare\Parser\Banking\Mt940\Engine::parseStatementBank() |
||
| 13 | */ |
||
| 14 | protected function parseStatementBank() |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * uses the 61 field to determine amount/value of the transaction. |
||
| 21 | * |
||
| 22 | * @return float |
||
| 23 | */ |
||
| 24 | protected function parseTransactionPrice() |
||
| 25 | { |
||
| 26 | $results = []; |
||
| 27 | if (preg_match('/^:61:.*?[CD]([\d,\.]+)[NSF]/i', $this->getCurrentTransactionData(), $results) |
||
| 28 | && !empty($results[1]) |
||
| 29 | ) { |
||
| 30 | return $this->sanitizePrice($results[1]); |
||
| 31 | } |
||
| 32 | |||
| 33 | return 0; |
||
| 34 | } |
||
| 35 | |||
| 36 | |||
| 37 | /** |
||
| 38 | * |
||
| 39 | * {@inheritdoc} |
||
| 40 | * @see \Kingsquare\Parser\Banking\Mt940\Engine::isApplicable() |
||
| 41 | */ |
||
| 42 | public static function isApplicable($string) |
||
| 47 | } |
||
| 48 | } |
||
| 49 |