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.

GeneralParameterFilter::filter()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 7
cts 7
cp 1
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Marlon Ogone package.
5
 *
6
 * (c) Marlon BVBA <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ogone\ParameterFilter;
13
14
class GeneralParameterFilter implements ParameterFilter
15
{
16 6
    public function filter(array $parameters)
17
    {
18 6
        $parameters = array_change_key_case($parameters, CASE_UPPER);
19 6
        array_walk($parameters, 'trim');
20 6
        $parameters = array_filter($parameters, function ($value) {
21 6
            return (bool) strlen($value);
22
23 6
        });
24
25 6
        return $parameters;
26
    }
27
}
28