Test Failed
Push — 2.0 ( 4d4d2f...3431b8 )
by Zaahid
04:28
created

PartBuilderFactory::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 3
b 0
f 0
nc 1
nop 3
dl 0
loc 8
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A PartBuilderFactory::newChildPartBuilder() 0 5 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\Part\ParsedMessagePartFactory;
0 ignored issues
show
Bug introduced by
The type ZBateson\MailMimeParser\...arsedMessagePartFactory was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
use Psr\Http\Message\StreamInterface;
11
12
/**
13
 * Responsible for creating PartBuilder instances.
14
 *
15
 * @author Zaahid Bateson
16
 */
17
class PartBuilderFactory
18
{
19
    /**
20
     * Constructs a new PartBuilder object and returns it
21
     * 
22
     * @param StreamInterface $messageStream
23
     * @return PartBuilder
24
     */
25
    public function newPartBuilder(StreamInterface $messageStream)
26
    {
27
        return new PartBuilder($messageStream);
28
    }
29
30
    /**
31
     * Constructs a new PartBuilder object and returns it
32
     *
33
     * @param ParsedMessagePartFactory $messagePartFactory
34
     * @param PartBuilder $parent
35
     * @return PartBuilder
36
     */
37
    public function newChildPartBuilder(PartBuilder $parent)
38
    {
39
        return new PartBuilder(
40
            null,
41
            $parent
42
        );
43
    }
44
}
45