Passed
Push — master ( f5d5b7...fa7e67 )
by Vítězslav
05:58
created

Smlouva   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 20
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A generovaniFaktur() 0 4 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
     * Evidence užitá objektem.
21
     *
22
     * @var string
23
     */
24
    public $evidence = 'smlouva';
25
26
    /**
27
     * Generuje faktury ze smluv. Pokud je nastaven sloupec <strong>id</strong> generují se pouze z této smlouvy.
28
     *
29
     * @link https://www.flexibee.eu/api/dokumentace/ref/generovani-faktur/ Interní dokumentace
30
     * 
31
     * @return boolean
32
     */
33
    public function generovaniFaktur()
34
    {
35
        $this->performRequest( ($this->getMyKey() ? $this->getMyKey().'/' : '' ). 'generovani-faktur', 'PUT');
36
        return $this->lastResponseCode == 200;
37
    }
38
}
39