Completed
Pull Request — master (#168)
by Daniel
21:48
created

Bootstrap   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 17
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
namespace Codappix\SearchCore;
3
4
use Codappix\SearchCore\Compatibility\ExtensionConfigurationInterface;
5
use TYPO3\CMS\Core\Utility\GeneralUtility;
6
use TYPO3\CMS\Extbase\Object\ObjectManager;
7
8
class Bootstrap
9
{
10
    /**
11
     * @return object|ObjectManager
12
     */
13
    public static function getObjectManager()
14
    {
15
        return GeneralUtility::makeInstance(ObjectManager::class);
16
    }
17
18
    /**
19
     * @return ExtensionConfigurationInterface
20
     */
21
    public static function getExtensionConfiguration()
22
    {
23
        return static::getObjectManager()->get(
24
            ExtensionConfigurationInterface::class
25
        );
26
    }
27
}
28