Completed
Push — master ( db937b...bb9c1e )
by Tim
14:24
created

ComposerUtility::checkContribLibs()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 17
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 17
rs 9.4285
cc 2
eloc 7
nc 2
nop 0
1
<?php
2
/**
3
 * ComposerUtility
4
 *
5
 * @author  Tim Lochmüller
6
 */
7
8
namespace FRUIT\Shopize\Utility;
9
10
use Omnipay\Omnipay;
11
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
12
use TYPO3\CMS\Core\Utility\GeneralUtility;
13
14
/**
15
 * ComposerUtility
16
 */
17
class ComposerUtility
18
{
19
20
    static public function checkContribLibs()
21
    {
22
        // avoid diuble class
23
        static $done = false;
24
        if ($done === true) {
25
            return;
26
        }
27
        $done = true;
28
29
        // start check
30
        #if (!class_exists(Omnipay::class)) {
31
        #    // Install composer?
32
        #    return;
33
        #}
34
        GeneralUtility::requireFile(ExtensionManagementUtility::extPath('shopize',
35
            'Resources/Private/Contrib/vendor/autoload.php'));
36
    }
37
}
38