Test Failed
Push — 2.0 ( 0b4092...91a8b2 )
by Zaahid
04:50
created

AbstractParser   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 9
c 1
b 0
f 0
dl 0
loc 32
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setParserManager() 0 3 1
A __construct() 0 6 1
A getParserPartProxyFactory() 0 3 1
A getParserMessageProxyFactory() 0 3 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\Parser;
8
9
use ZBateson\MailMimeParser\Parser\Proxy\ParserPartProxyFactory;
10
11
/**
12
 * Description of AbstractParser
13
 *
14
 * @author Zaahid Bateson
15
 */
16
abstract class AbstractParser implements IParser
17
{
18
    protected $parserMessageProxyFactory;
19
20
    protected $parserPartProxyFactory;
21
22
    /**
23
     * @var ParserManager
24
     */
25
    protected $parserManager;
26
27
    public function __construct(
28
        ParserPartProxyFactory $parserMessageProxyFactory,
29
        ParserPartProxyFactory $parserPartProxyFactory
30
    ) {
31
        $this->parserMessageProxyFactory = $parserMessageProxyFactory;
32
        $this->parserPartProxyFactory = $parserPartProxyFactory;
33
    }
34
35
    public function setParserManager(ParserManager $pm)
36
    {
37
        $this->parserManager = $pm;
38
    }
39
40
    public function getParserMessageProxyFactory()
41
    {
42
        return $this->parserMessageProxyFactory;
43
    }
44
45
    public function getParserPartProxyFactory()
46
    {
47
        return $this->parserPartProxyFactory;
48
    }
49
}
50