AbstractHelper::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 2
crap 1
1
<?php
2
/**
3
 * This file is part of the ZBateson\MailMimeParser project.
4
 *
5
 * @license http://opensource.org/licenses/bsd-license.php BSD
6
 */
7
8
namespace ZBateson\MailMimeParser\Message\Helper;
9
10
use ZBateson\MailMimeParser\Message\Factory\IMimePartFactory;
11
use ZBateson\MailMimeParser\Message\Factory\IUUEncodedPartFactory;
12
13
/**
14
 * Base class for message helpers.
15
 *
16
 * @author Zaahid Bateson
17
 */
18
abstract class AbstractHelper
19
{
20
    /**
21
     * @var IMimePartFactory to create parts for attachments/content
22
     */
23
    protected IMimePartFactory $mimePartFactory;
24
25
    /**
26
     * @var IUUEncodedPartFactory to create parts for attachments
27
     */
28
    protected IUUEncodedPartFactory $uuEncodedPartFactory;
29
30 32
    public function __construct(
31
        IMimePartFactory $mimePartFactory,
32
        IUUEncodedPartFactory $uuEncodedPartFactory
33
    ) {
34 32
        $this->mimePartFactory = $mimePartFactory;
35 32
        $this->uuEncodedPartFactory = $uuEncodedPartFactory;
36
    }
37
}
38