Completed
Push — master ( d7cdbc...2653c8 )
by Robin
13s queued 12s
created

Bunq   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 23
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A parseStatementBank() 0 3 1
A isApplicable() 0 5 1
1
<?php
2
namespace Kingsquare\Parser\Banking\Mt940\Engine;
3
4
use Kingsquare\Parser\Banking\Mt940\Engine;
5
6
class Bunq extends Engine
7
{
8
9
    /**
10
     *
11
     * {@inheritdoc}
12
     * @see \Kingsquare\Parser\Banking\Mt940\Engine::parseStatementBank()
13
     */
14
    protected function parseStatementBank()
15
    {
16
        return 'BUNQ';
17
    }
18
19
    /**
20
     *
21
     * {@inheritdoc}
22
     * @see \Kingsquare\Parser\Banking\Mt940\Engine::isApplicable()
23
     */
24
    public static function isApplicable($string)
25
    {
26
        $firstline = strtok($string, "\r\n\t");
27
28
        return strpos($firstline, 'BUNQ') !== false;
29
    }
30
}
31