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

Completed
Push — 0.9 ( 7d978d...1ce8ac )
by Henrique
07:01 queued 01:39
created

True   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 18
ccs 9
cts 9
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 15 3
1
<?php
2
namespace Respect\Validation\Rules;
3
4
class True extends AbstractRule
5
{
6 12
    public function validate($input)
7
    {
8 12
        if (! is_string($input) || is_numeric($input)) {
9 6
            return ($input == true);
10
        }
11
12
        $validValues   = array(
13 6
            'on',
14 6
            'true',
15 6
            'yes',
16 6
        );
17 6
        $filteredInput = strtolower($input);
18
19 6
        return in_array($filteredInput, $validValues);
20
    }
21
}
22