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

ComposerUtility   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A checkContribLibs() 0 17 2
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