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/AbstractDlfValidator.php (1 issue)

Labels
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 InvalidArgumentException;
18
use Psr\Log\LoggerAwareTrait;
19
use TYPO3\CMS\Core\Log\LogManager;
20
use TYPO3\CMS\Core\Utility\GeneralUtility;
21
use TYPO3\CMS\Extbase\Error\Result;
22
use TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator;
23
24
/**
25
 * Base Validator provides functionalities for using the derived validator within a validation stack.
26
 *
27
 * @package TYPO3
28
 * @subpackage dlf
29
 *
30
 * @access public
31
 */
32
abstract class AbstractDlfValidator extends AbstractValidator
33
{
34
    use LoggerAwareTrait;
35
36
    protected string $valueClassName;
37
38
    /**
39
     * @param $valueClassName string The class name of the value
40
     */
41
    public function __construct(string $valueClassName)
42
    {
43
        $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(static::class);
44
        $this->valueClassName = $valueClassName;
45
    }
46
47
    public function validate($value): Result
48
    {
49
        if (!$value instanceof $this->valueClassName) {
50
            $this->logger->debug('Value must be an instance of ' . $this->valueClassName . '.');
0 ignored issues
show
The method debug() does not exist on null. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

50
            $this->logger->/** @scrutinizer ignore-call */ 
51
                           debug('Value must be an instance of ' . $this->valueClassName . '.');

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
51
            throw new InvalidArgumentException('Type of value is not valid.', 1723126505626);
52
        }
53
        return parent::validate($value);
54
    }
55
}
56