DocumentFile   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 96
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 19
dl 0
loc 96
rs 10
c 0
b 0
f 0
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A setAgendaId() 0 5 1
A setFile() 0 5 1
A isFileSplit() 0 3 1
A getType() 0 3 1
A setFiles() 0 5 1
A setType() 0 5 1
A getAgendaId() 0 3 1
A setFileSplit() 0 5 1
A getFiles() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of datamolino client.
5
 *
6
 * (c) 2018 cwd.at GmbH <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Cwd\Datamolino\Model;
15
16
class DocumentFile
17
{
18
    /** @var UploadFile[] */
19
    private $files = [];
20
    /** @var int */
21
    private $agendaId;
22
    /** @var bool */
23
    private $fileSplit = false;
24
    /** @var string */
25
    private $type = Document::DOCTYPE_PURCHASE;
26
27
    /**
28
     * @return UploadFile[]
29
     */
30
    public function getFiles(): array
31
    {
32
        return $this->files;
33
    }
34
35
    /**
36
     * @param UploadFile[] $files
37
     *
38
     * @return DocumentFile
39
     */
40
    public function setFiles(array $files): DocumentFile
41
    {
42
        $this->files = $files;
43
44
        return $this;
45
    }
46
47
    public function setFile(UploadFile $file): DocumentFile
48
    {
49
        $this->files[] = $file;
50
51
        return $this;
52
    }
53
54
    /**
55
     * @return int
56
     */
57
    public function getAgendaId(): int
58
    {
59
        return $this->agendaId;
60
    }
61
62
    /**
63
     * @param int $agendaId
64
     *
65
     * @return DocumentFile
66
     */
67
    public function setAgendaId(int $agendaId): DocumentFile
68
    {
69
        $this->agendaId = $agendaId;
70
71
        return $this;
72
    }
73
74
    /**
75
     * @return bool
76
     */
77
    public function isFileSplit(): bool
78
    {
79
        return $this->fileSplit;
80
    }
81
82
    /**
83
     * @param bool $fileSplit
84
     *
85
     * @return DocumentFile
86
     */
87
    public function setFileSplit(bool $fileSplit): DocumentFile
88
    {
89
        $this->fileSplit = $fileSplit;
90
91
        return $this;
92
    }
93
94
    /**
95
     * @return string
96
     */
97
    public function getType(): string
98
    {
99
        return $this->type;
100
    }
101
102
    /**
103
     * @param string $type
104
     *
105
     * @return DocumentFile
106
     */
107
    public function setType(string $type): DocumentFile
108
    {
109
        $this->type = $type;
110
111
        return $this;
112
    }
113
}
114