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 (#810)
by Beatrycze
09:15 queued 05:07
created

View3DController::mainAction()   B

Complexity

Conditions 6
Paths 3

Size

Total Lines 32
Code Lines 23

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 6
eloc 23
c 1
b 0
f 0
nc 3
nop 0
dl 0
loc 32
rs 8.9297
1
<?php
2
/**
3
 * (c) Kitodo. Key to digital objects e.V. <[email protected]>
4
 *
5
 * This file is part of the Kitodo and TYPO3 projects.
6
 *
7
 * @license GNU General Public License version 3 or later.
8
 * For the full copyright and license information, please read the
9
 * LICENSE.txt file that was distributed with this source code.
10
 */
11
12
namespace Kitodo\Dlf\Controller;
13
14
use Kitodo\Dlf\Common\Doc;
15
16
/**
17
 * Plugin 'View3D' for the 'dlf' extension
18
 *
19
 * @author Beatrycze Volk <[email protected]>
20
 * @package TYPO3
21
 * @subpackage dlf
22
 * @access public
23
 */
24
class View3DController extends AbstractController
25
{
26
    /**
27
     * @return string|void
28
     */
29
    public function mainAction()
30
    {
31
        $this->cObj = $this->configurationManager->getContentObject();
0 ignored issues
show
Bug Best Practice introduced by
The property cObj does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
32
        // Load current document.
33
        $this->loadDocument($this->requestData);
34
        if (
35
            $this->document === null
36
            || $this->document->getDoc() === null
37
            || $this->document->getDoc()->metadataArray['LOG_0001']['type'][0] != 'object'
38
        ) {
39
            // Quit without doing anything if required variables are not set.
40
            return '';
41
        } else {
42
            $url = $this->document->getDoc()->getFileLocation($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[1]]['files']['DEFAULT']);
43
            if ($this->settings['useInternalProxy']) {
44
                // Configure @action URL for form.
45
                $uri = $this->uriBuilder->reset()
46
                    ->setTargetPageUid($GLOBALS['TSFE']->id)
47
                    ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']) ? true : false)
48
                    ->setArguments([
49
                        'eID' => 'tx_dlf_pageview_proxy',
50
                        'url' => urlencode($url),
51
                        'uHash' => GeneralUtility::hmac($url, 'PageViewProxy')
0 ignored issues
show
Bug introduced by
The type Kitodo\Dlf\Controller\GeneralUtility was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
52
                        ])
53
                    ->build();
54
                    $url = $uri;
55
            }
56
57
            $this->view->assign('url', $url);
58
            $this->view->assign('scriptMain', '/typo3conf/ext/dlf/Resources/Public/Javascript/3DViewer/main.js');
59
            $this->view->assign('scriptToastify', '/typo3conf/ext/dlf/Resources/Public/Javascript/3DViewer/toastify.js');
60
            $this->view->assign('scriptSpinner', '/typo3conf/ext/dlf/Resources/Public/Javascript/3DViewer/spinner/main.js');
61
        }
62
    }
63
}
64