Completed
Push — master ( f6b491...95083d )
by Sebastian
02:00
created

PdfContent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A asString() 0 4 1
A getContentType() 0 4 1
1
<?php
2
namespace Kartenmacherei\RestFramework\Response\Content;
3
4
class PdfContent implements Content 
5
{
6
    /**
7
     * @var string
8
     */
9
    private $value;
10
11
    /**
12
     * @param string $value
13
     */
14
    public function __construct(string $value)
15
    {
16
        $this->value = $value;
17
    }
18
19
    /**
20
     * @return string
21
     */
22
    public function asString(): string
23
    {
24
        return $this->value;
25
    }
26
27
    /**
28
     * @return ContentType
29
     */
30
    public function getContentType(): ContentType
31
    {
32
        return new PdfContentType();
33
    }
34
35
}