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

Bootstrap::getObjectManager()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
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 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
}