Test Failed
Branch 1.0.0 (84f469)
by Zaahid
05:36
created

NonMimePartFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A newInstance() 0 10 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\Part;
8
9
/**
10
 * Responsible for creating NoneMimePart instances.
11
 *
12
 * @author Zaahid Bateson
13
 */
14
class NonMimePartFactory extends MessagePartFactory
15
{
16
    /**
17
     * Constructs a new NonMimePart object and returns it
18
     * 
19
     * @param string $messageObjectId
20
     * @param PartBuilder $partBuilder
21
     * @param PartStreamFilterManager $partStreamFilterManager
0 ignored issues
show
Bug introduced by
There is no parameter named $partStreamFilterManager. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
22
     * @return \ZBateson\MailMimeParser\Message\Part\NonMimePart
23
     */
24
    public function newInstance(
25
        $messageObjectId,
26
        PartBuilder $partBuilder
27
    ) {
28
        return new NonMimePart(
29
            $messageObjectId,
30
            $partBuilder,
31
            $this->partStreamFilterManagerFactory->newInstance()
32
        );
33
    }
34
}
35