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

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\ViewHelpers;
14
15
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
16
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
17
18
/**
19
 * Checks if the given subject is an array.
20
 */
21
class IsArrayViewHelper extends AbstractViewHelper
22
{
23
    public function initializeArguments()
24
    {
25
        parent::initializeArguments();
26
        $this->registerArgument('subject', 'string', 'The subject');
27
    }
28
29
    /**
30
     * @return bool
31
     */
32
    public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
33
    {
34
        $subject = $arguments['subject'];
35
        if ($subject === null) {
36
            $subject = $renderChildrenClosure();
37
        }
38
39
        return \is_array($subject);
0 ignored issues
show
Bug Best Practice introduced by
The expression return is_array($subject) returns the type boolean which is incompatible with the return type mandated by TYPO3Fluid\Fluid\Core\Vi...terface::renderStatic() of string.

In the issue above, the returned value is violating the contract defined by the mentioned interface.

Let's take a look at an example:

interface HasName {
    /** @return string */
    public function getName();
}

class Name {
    public $name;
}

class User implements HasName {
    /** @return string|Name */
    public function getName() {
        return new Name('foo'); // This is a violation of the ``HasName`` interface
                                // which only allows a string value to be returned.
    }
}
Loading history...
40
    }
41
}
42