Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 8b5010...f1d707 )
by Sebastian
02:41
created

ExtensionManagementUtility   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 13
dl 0
loc 31
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A addPItoST43() 0 16 4
1
<?php
2
namespace Kitodo\Dlf\Hooks;
3
4
/**
5
 * (c) Kitodo. Key to digital objects e.V. <[email protected]>
6
 *
7
 * This file is part of the Kitodo and TYPO3 projects.
8
 *
9
 * @license GNU General Public License version 3 or later.
10
 * For the full copyright and license information, please read the
11
 * LICENSE.txt file that was distributed with this source code.
12
 */
13
14
use Kitodo\Dlf\Common\Helper;
15
16
/**
17
 * Hooks and helper for \TYPO3\CMS\Core\Utility\ExtensionManagementUtility
18
 *
19
 * @author Sebastian Meyer <[email protected]>
20
 * @package TYPO3
21
 * @subpackage dlf
22
 * @access public
23
 */
24
class ExtensionManagementUtility extends \TYPO3\CMS\Core\Utility\ExtensionManagementUtility {
25
    /**
26
     * Add plugin to static template for css_styled_content
27
     * @see \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43()
28
     *
29
     * @access public
30
     *
31
     * @param string $key: The extension key
32
     * @param string $class: The qualified class name
33
     * @param string $suffix: The uid of the record
34
     * @param string $type: Determines the type of the frontend plugin
35
     * @param boolean $cached: Should we created a USER object instead of USER_INT?
36
     *
37
     * @return void
38
     */
39
    public static function addPItoST43($key, $class, $suffix = '', $type = 'list_type', $cached = FALSE) {
40
        $internalName = 'tx_'.$key.'_'.strtolower(Helper::getUnqualifiedClassName($class));
41
        // General plugin
42
        $typoscript = 'plugin.'.$internalName.' = USER'.($cached ? '' : '_INT')."\n";
43
        $typoscript .= 'plugin.'.$internalName.'.userFunc = '.$class.'->main'."\n";
44
        parent::addTypoScript($key, 'setup', $typoscript);
45
        // Add after defaultContentRendering
46
        switch ($type) {
47
            case 'list_type':
48
                $addLine = 'tt_content.list.20.'.$key.$suffix.' = < plugin.'.$internalName;
49
                break;
50
            default:
51
                $addLine = '';
52
        }
53
        if ($addLine) {
54
            parent::addTypoScript($key, 'setup', $addLine, 'defaultContentRendering');
55
        }
56
    }
57
}
58