HelperFactory::createGlobalFunctionsHelper()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Box\Spout\Common\Creator;
4
5
use Box\Spout\Common\Helper\EncodingHelper;
6
use Box\Spout\Common\Helper\FileSystemHelper;
7
use Box\Spout\Common\Helper\GlobalFunctionsHelper;
8
use Box\Spout\Common\Helper\StringHelper;
9
10
/**
11
 * Class HelperFactory
12
 * Factory to create helpers
13
 */
14
class HelperFactory
15
{
16
    /**
17
     * @return GlobalFunctionsHelper
18
     */
19 97
    public function createGlobalFunctionsHelper()
20
    {
21 97
        return new GlobalFunctionsHelper();
22
    }
23
24
    /**
25
     * @param string $baseFolderPath The path of the base folder where all the I/O can occur
26
     * @return FileSystemHelper
27
     */
28 14
    public function createFileSystemHelper($baseFolderPath)
29
    {
30 14
        return new FileSystemHelper($baseFolderPath);
31
    }
32
33
    /**
34
     * @param GlobalFunctionsHelper $globalFunctionsHelper
35
     * @return EncodingHelper
36
     */
37 27
    public function createEncodingHelper(GlobalFunctionsHelper $globalFunctionsHelper)
38
    {
39 27
        return new EncodingHelper($globalFunctionsHelper);
40
    }
41
42
    /**
43
     * @return StringHelper
44
     */
45
    public function createStringHelper()
46
    {
47
        return new StringHelper();
48
    }
49
}
50