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

IUUEncodedPartFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
c 0
b 0
f 0
dl 0
loc 18
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A newInstance() 0 11 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
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