Completed
Pull Request — develop_3.0 (#457)
by Adrien
02:34
created

HelperFactory::createGlobalFunctionsHelper()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

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
eloc 2
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
9
/**
10
 * Class HelperFactory
11
 * Factory to create helpers
12
 *
13
 * @package Box\Spout\Common\Creator
14
 */
15
class HelperFactory
16
{
17
    /**
18
     * @return GlobalFunctionsHelper
19
     */
20 79
    public function createGlobalFunctionsHelper()
21
    {
22 79
        return new GlobalFunctionsHelper();
23
    }
24
25
    /**
26
     * @param string $baseFolderPath The path of the base folder where all the I/O can occur
27
     * @return FileSystemHelper
28
     */
29 8
    public function createFileSystemHelper($baseFolderPath)
30
    {
31 8
        return new FileSystemHelper($baseFolderPath);
32
    }
33
34
    /**
35
     * @param GlobalFunctionsHelper $globalFunctionsHelper
36
     * @return EncodingHelper
37
     */
38 26
    public function createEncodingHelper(GlobalFunctionsHelper $globalFunctionsHelper)
39
    {
40 26
        return new EncodingHelper($globalFunctionsHelper);
41
    }
42
}
43