Passed
Pull Request — master (#168)
by
unknown
05:32
created

Bootstrap   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 17
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getExtensionConfiguration() 0 4 1
A getObjectManager() 0 3 1
1
<?php
2
3
namespace Codappix\SearchCore;
4
5
use Codappix\SearchCore\Compatibility\ExtensionConfigurationInterface;
6
use TYPO3\CMS\Core\Utility\GeneralUtility;
7
use TYPO3\CMS\Extbase\Object\ObjectManager;
8
9
class Bootstrap
10
{
11
    /**
12
     * @return object|ObjectManager
13
     */
14 48
    public static function getObjectManager()
15
    {
16 48
        return GeneralUtility::makeInstance(ObjectManager::class);
17
    }
18
19
    /**
20
     * @return ExtensionConfigurationInterface
21
     */
22 48
    public static function getExtensionConfiguration()
23
    {
24 48
        return static::getObjectManager()->get(
25 48
            ExtensionConfigurationInterface::class
26
        );
27
    }
28
}