Completed
Push — master ( b64fc1...5651bd )
by Raffael
16:20 queued 08:39
created

Validator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 14
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 8 2
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * tubee
7
 *
8
 * @copyright   Copryright (c) 2017-2019 gyselroth GmbH (https://gyselroth.com)
9
 * @license     GPL-3.0 https://opensource.org/licenses/GPL-3.0
10
 */
11
12
namespace Tubee\Job;
13
14
use Tubee\Helper;
15
16
class Validator
17
{
18
    /**
19
     * Validate resource.
20
     */
21
    public static function validate(array $resource): array
22
    {
23
        if (isset($resource['data']['filter'])) {
24
            Helper::jsonDecode(stripslashes($resource['data']['filter']), true);
25
        }
26
27
        return $resource;
28
    }
29
}
30