Test Failed
Push — 2.0 ( 3431b8...9e8731 )
by Zaahid
03:11
created

IUUEncodedPartFactory::newInstance()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 11
rs 10
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
namespace ZBateson\MailMimeParser\Message\Factory;
8
9
use ZBateson\MailMimeParser\Message\UUEncodedPart;
10
11
/**
12
 * Responsible for creating UUEncodedPart instances.
13
 *
14
 * @author Zaahid Bateson
15
 */
16
class IUUEncodedPartFactory extends IMessagePartFactory
17
{
18
    /**
19
     * Constructs a new UUEncodedPart object and returns it
20
     * 
21
     * @return \ZBateson\MailMimeParser\Message\IUUEncodedPart
22
     */
23
    public function newInstance()
24
    {
25
        $streamContainer = $this->partStreamContainerFactory->newInstance();
26
        $part = new UUEncodedPart(
27
            null,
28
            null,
29
            null,
30
            $streamContainer
31
        );
32
        $streamContainer->setStream($this->streamFactory->newMessagePartStream($part));
33
        return $part;
34
    }
35
}
36