Completed
Push — 1.0.0 ( 608796...a0ab23 )
by Zaahid
04:48
created

UUEncodedPartFactory::newInstance()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 2
dl 0
loc 7
ccs 6
cts 6
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
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\Factory;
8
9
use Psr\Http\Message\StreamInterface;
10
use ZBateson\MailMimeParser\Message\Part\UUEncodedPart;
11
use ZBateson\MailMimeParser\Message\Part\PartBuilder;
12
13
/**
14
 * Responsible for creating UUEncodedPart instances.
15
 *
16
 * @author Zaahid Bateson
17
 */
18
class UUEncodedPartFactory extends MessagePartFactory
19
{
20
    /**
21
     * Constructs a new UUEncodedPart object and returns it
22
     * 
23
     * @param StreamInterface $messageStream
24
     * @param PartBuilder $partBuilder
25
     * @return \ZBateson\MailMimeParser\Message\UUEncodedPartPart
0 ignored issues
show
Bug introduced by
The type ZBateson\MailMimeParser\Message\UUEncodedPartPart 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...
26
     */
27 1
    public function newInstance(StreamInterface $messageStream, PartBuilder $partBuilder)
28
    {
29 1
        return new UUEncodedPart(
30 1
            $partBuilder,
31 1
            $this->partStreamFilterManagerFactory->newInstance(),
32 1
            $this->streamDecoratorFactory->getLimitedPartStream($messageStream, $partBuilder),
33 1
            $this->streamDecoratorFactory->getLimitedContentStream($messageStream, $partBuilder)
34
        );
35
    }
36
}
37