Passed
Push — 1.0.0 ( a1adee...bca153 )
by Zaahid
03:20
created

Configuration   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 30
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setContentCharset() 0 4 1
A getContentCharset() 0 4 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\Util;
8
9
/**
10
 * Holds global configuration options.
11
 *
12
 * @author Zaahid Bateson
13
 */
14
class Configuration
15
{
16
    /**
17
     * @var string the charset used for returning content strings, e.g.
18
     *      $part->getContent or $part->getResourceContentHandle
19
     */
20
    private $contentCharset;
21
    
22
    /**
23
     * Sets the charset of returned strings in content returned from calls to
24
     * MimePart (e.g. getContent or getContentResourceHandle)
25
     * 
26
     * @param string $contentCharset
27
     */
28
    public function setContentCharset($contentCharset)
29
    {
30
        $this->contentCharset = $contentCharset;
31
    }
32
33
    /**
34
     * Returns the charset for returned strings in content returned from calls
35
     * to MimePart (e.g. getContent or getContentResourceHandle)
36
     * 
37
     * @return string
38
     */
39
    public function getContentCharset()
40
    {
41
        return $this->contentCharset;
42
    }
43
}
44