Banka   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 3
eloc 8
dl 0
loc 37
c 0
b 0
f 0
ccs 4
cts 6
cp 0.6667
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A automatickeParovani() 0 4 2
A stahnoutVypisyOnline() 0 4 1
1
<?php
2
/**
3
 * FlexiPeeHP - Bank Class.
4
 *              Objekt Banky.
5
 *
6
 * @author     Vítězslav Dvořák <[email protected]>
7
 * @copyright  (C) 2015-2017 Spoje.Net
8
 */
9
10
namespace FlexiPeeHP;
11
12
/**
13
 * Banka
14
 * 
15
 * @link https://demo.flexibee.eu/c/demo/banka/properties Vlastnosti evidence
16
 */
17
class Banka extends FlexiBeeRW
18
{
19
    use Stitky;
20
    use Firma;
21
    
22
    /**
23
     * Evidence užitá objektem.
24
     *
25
     * @var string
26
     */
27
    public $evidence = 'banka';
28
29
    /**
30
     * Stáhne bankovní výpisy  ( trvá delší dobu )
31 1
     *
32
     * @return boolean
33 1
     */
34
    public function stahnoutVypisyOnline()
35
    {
36
        $this->performRequest('nacteni-vypisu-online.json', 'PUT', 'txt');
37
        return $this->lastResponseCode == 200;
38
    }
39
40
    /**
41
     * Start invoice authomatic matching process ( it take longer time )
42
     * Spustí proces automatického párování plateb. ( trvá delší dobu )
43
     *
44 1
     * @link https://demo.flexibee.eu/devdoc/parovani-plateb Interní dokumentace
45
     * 
46 1
     * @param boolean $advanced Use Advanced matching method ?
47
     * 
48
     * @return boolean
49
     */
50
    public function automatickeParovani($advanced = false)
51
    {
52
        $this->performRequest('automaticke-parovani'.($advanced ? '-pokrocile' : '' ), 'PUT');
53
        return $this->lastResponseCode == 200;
54
    }
55
}
56