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
Pull Request — master (#773)
by Beatrycze
02:55
created

View3D   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 2
eloc 11
c 3
b 0
f 0
dl 0
loc 31
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A main() 0 17 2
1
<?php
2
3
/**
4
 * (c) Kitodo. Key to digital objects e.V. <[email protected]>
5
 *
6
 * This file is part of the Kitodo and TYPO3 projects.
7
 *
8
 * @license GNU General Public License version 3 or later.
9
 * For the full copyright and license information, please read the
10
 * LICENSE.txt file that was distributed with this source code.
11
 */
12
13
namespace Kitodo\Dlf\Plugin;
14
15
use TYPO3\CMS\Core\Utility\GeneralUtility;
16
17
/**
18
 * Plugin 'Three Dimensional View' for the 'dlf' extension
19
 *
20
 * @author Beatrycze Volk <[email protected]>
21
 * @package TYPO3
22
 * @subpackage dlf
23
 * @access public
24
 */
25
class View3D extends \Kitodo\Dlf\Common\AbstractPlugin
26
{
27
    public $scriptRelPath = 'Classes/Plugin/View3D.php';
28
29
        /**
30
     * The main method of the PlugIn
31
     *
32
     * @access public
33
     *
34
     * @param string $content: The PlugIn content
35
     * @param array $conf: The PlugIn configuration
36
     *
37
     * @return string The content that is displayed on the website
38
     */
39
    public function main($content, $conf)
40
    {
41
        $this->init($conf);
42
        // Load current document.
43
        $this->loadDocument();
44
        if ($this->doc->metadataArray['LOG_0001']['type'][0] != 'object') {
45
            // Quit without doing anything if required variables are not set.
46
            return $content;
47
        } else {
48
            // Load template file.
49
            $this->getTemplate();
50
51
            // Fill in the template markers.
52
            $markerArray['###URL###'] = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[1]]['files']['DEFAULT']);
53
54
            $content .= $this->templateService->substituteMarkerArray($this->template, $markerArray);
55
            return $this->pi_wrapInBaseClass($content);
56
        }
57
    }
58
}
59