Smlouva   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 7
dl 0
loc 24
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A generovaniFaktur() 0 5 2
1
<?php
2
/**
3
 * FlexiPeeHP - Contract Class.
4
 *              Objekt Smlouvy.
5
 *
6
 * @author     Vítězslav Dvořák <[email protected]>
7
 * @copyright  (C) 2018 Spoje.Net
8
 */
9
10
namespace FlexiPeeHP;
11
12
/**
13
 * Smlouva
14
 * 
15
 * @link https://demo.flexibee.eu/c/demo/smlouva/properties Vlastnosti evidence
16
 */
17
class Smlouva extends FlexiBeeRW
18
{
19
20
    use Stitky;
21
    use Firma;
22
    /**
23
     * Evidence užitá objektem.
24
     *
25
     * @var string
26
     */
27
    public $evidence = 'smlouva';
28
29
    /**
30
     * Generuje faktury ze smluv. Pokud je nastaven sloupec <strong>id</strong> generují se pouze z této smlouvy.
31
     *
32
     * @link https://www.flexibee.eu/api/dokumentace/ref/generovani-faktur/ Interní dokumentace
33
     * 
34
     * @return boolean
35
     */
36
    public function generovaniFaktur()
37
    {
38
        $this->performRequest(($this->getMyKey() ? $this->getMyKey().'/' : '' ).'generovani-faktur',
39
            'PUT');
40
        return $this->lastResponseCode == 200;
41
    }
42
}
43