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 (#336)
by
unknown
03:50
created

IiifUrlReader   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 6
dl 0
loc 30
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getInstance() 0 5 2
A getContent() 0 2 1
1
<?php
2
namespace Kitodo\Dlf\Common;
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 TYPO3\CMS\Core\Utility\GeneralUtility;
15
use Ubl\Iiif\Tools\UrlReaderInterface;
16
17
/**
18
 * Implementation of Ubl\Iiif\Tools\UrlReaderInterface for the 'dlf' TYPO3 extension.
19
 * Allows the use of TYPO3 framework functions for loading remote documents in the
20
 * IIIF library.
21
 *
22
 * @author Lutz Helm <[email protected]>
23
 *
24
 */
25
class IiifUrlReader implements UrlReaderInterface {
26
    /**
27
     * Singleton instance of the class
28
     *
29
     * @access protected
30
     * @var IiifUrlReader
31
     */
32
    protected static $instance;
33
34
    /**
35
     *
36
     * {@inheritDoc}
37
     * @see \Ubl\Iiif\Tools\UrlReaderInterface::getContent()
38
     */
39
    public function getContent($url) {
40
        return GeneralUtility::getUrl($url);
0 ignored issues
show
Bug Best Practice introduced by
The expression return TYPO3\CMS\Core\Ut...alUtility::getUrl($url) also could return the type false which is incompatible with the return type mandated by Ubl\Iiif\Tools\UrlReaderInterface::getContent() of string.
Loading history...
41
    }
42
43
    /**
44
     * Return a singleton instance.
45
     *
46
     * @static
47
     *
48
     * @return IiifUrlReader
49
     */
50
    public static function getInstance() {
51
        if (!isset(self::$instance)) {
52
            self::$instance = new IiifUrlReader();
53
        }
54
        return self::$instance;
55
    }
56
}
57