Test Failed
Push — 2.0 ( 9e8731...0b4092 )
by Zaahid
03:06
created

ParserPartStreamContainerFactory::newInstance()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 2
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\Parser\Part;
8
9
use ZBateson\MailMimeParser\Parser\Proxy\ParserPartProxy;
10
use ZBateson\MailMimeParser\Stream\StreamFactory;
11
12
/**
13
 * Creates ParserPartStreamContainer instances.
14
 *
15
 * @author Zaahid Bateson
16
 */
17
class ParserPartStreamContainerFactory
18
{
19
    /**
20
     * @var StreamFactory
21
     */
22
    protected $streamFactory;
23
24
    public function __construct(StreamFactory $streamFactory)
25
    {
26
        $this->streamFactory = $streamFactory;
27
    }
28
29
    public function newInstance(ParserPartProxy $parserProxy) {
30
        return new ParserPartStreamContainer($this->streamFactory, $parserProxy);
31
    }
32
}
33