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.

Issues (210)

Classes/Validation/XmlSchemesValidator.php (1 issue)

Severity
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * (c) Kitodo. Key to digital objects e.V. <[email protected]>
7
 *
8
 * This file is part of the Kitodo and TYPO3 projects.
9
 *
10
 * @license GNU General Public License version 3 or later.
11
 * For the full copyright and license information, please read the
12
 * LICENSE.txt file that was distributed with this source code.
13
 */
14
15
namespace Kitodo\Dlf\Validation;
16
17
use DOMDocument;
18
19
/**
20
 * The validator combines the configured schemes into one schema and validates the provided DOMDocument against this.
21
 *
22
 * @package TYPO3
23
 * @subpackage dlf
24
 *
25
 * @access public
26
 */
27
class XmlSchemesValidator extends AbstractDlfValidator
28
{
29
    use LibXmlTrait;
0 ignored issues
show
The trait Kitodo\Dlf\Validation\LibXmlTrait requires some properties which are not provided by Kitodo\Dlf\Validation\XmlSchemesValidator: $message, $code
Loading history...
30
31
    private array $schemes;
32
33
    public function __construct(array $configuration)
34
    {
35
        parent::__construct(DOMDocument::class);
36
        $this->schemes = $configuration;
37
    }
38
39
    /**
40
     * Combines the schemes to one schema and validates the DOMDocument against this.
41
     *
42
     * @param $value DOMDocument The value to validate
43
     * @return bool True if is valid
44
     */
45
    protected function isSchemeValid(DOMDocument $value): bool
46
    {
47
        $xsd = '<?xml version="1.0" encoding="utf-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">';
48
        foreach ($this->schemes as $scheme) {
49
            $xsd .= '<xs:import namespace="' . $scheme["namespace"] . '" schemaLocation="' . $scheme["schemaLocation"] . '"/>';
50
        }
51
        $xsd .= '</xs:schema>';
52
        return $value->schemaValidateSource($xsd);
53
    }
54
55
    protected function isValid($value): void
56
    {
57
        $this->enableErrorBuffer();
58
        if (!$this->isSchemeValid($value)) {
59
            $this->addErrorsOfBuffer();
60
        }
61
        $this->disableErrorBuffer();
62
    }
63
}
64