CreatePastePayload::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Nastoletni\Code\Application\Service;
6
7
use Nastoletni\Code\Domain\Paste;
8
9
class CreatePastePayload
10
{
11
    /**
12
     * @var Paste
13
     */
14
    private $paste;
15
16
    /**
17
     * @var string
18
     */
19
    private $encryptionKey;
20
21
    /**
22
     * CreatePastePayload constructor.
23
     *
24
     * @param Paste  $paste
25
     * @param string $encryptionKey
26
     */
27 4
    public function __construct(Paste $paste, string $encryptionKey)
28
    {
29 4
        $this->paste = $paste;
30 4
        $this->encryptionKey = $encryptionKey;
31 4
    }
32
33
    /**
34
     * @return Paste
35
     */
36 1
    public function getPaste(): Paste
37
    {
38 1
        return $this->paste;
39
    }
40
41
    /**
42
     * @return string
43
     */
44 1
    public function getEncryptionKey(): string
45
    {
46 1
        return $this->encryptionKey;
47
    }
48
}
49