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
Push — master ( 9c3470...c852c0 )
by
unknown
02:52
created

Input   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A filter() 0 13 4
1
<?php
2
/**
3
 * This file is part of the O2System PHP Framework package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @author         Steeve Andrian Salim
9
 * @copyright      Copyright (c) Steeve Andrian Salim
10
 */
11
12
// ------------------------------------------------------------------------
13
14
namespace O2System\Framework\Http;
15
16
// ------------------------------------------------------------------------
17
18
use O2System\Security\Filters\Xss;
0 ignored issues
show
Bug introduced by
The type O2System\Security\Filters\Xss 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...
19
20
/**
21
 * Class Input
22
 * @package O2System\Framework\Http
23
 */
24
class Input extends \O2System\Kernel\Http\Input
25
{
26
    /**
27
     * Input::filter
28
     *
29
     * @param int $type
30
     * @param null $offset
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $offset is correct as it would always require null to be passed?
Loading history...
31
     * @param int $filter
32
     * @return mixed|\O2System\Spl\Datastructures\SplArrayObject|string
33
     */
34
    protected function filter($type, $offset = null, $filter = FILTER_DEFAULT)
35
    {
36
        if (services()->has('xssProtection')) {
0 ignored issues
show
Bug introduced by
The function services was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

36
        if (/** @scrutinizer ignore-call */ services()->has('xssProtection')) {
Loading history...
37
            if (!services()->get('xssProtection')->verify()) {
38
                $string = parent::filter($type, $offset, $filter);
39
40
                if (is_string($string)) {
0 ignored issues
show
introduced by
The condition is_string($string) is always false.
Loading history...
41
                    return Xss::clean($string);
42
                }
43
            }
44
        }
45
46
        return parent::filter($type, $offset, $filter);
47
    }
48
}