Json   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A isValid() 0 3 1
1
<?php
2
namespace Health\Checks\File;
3
4
use Health\Checks\HealthCheckInterface;
5
6
class Json extends Base implements HealthCheckInterface
7
{
8
9
    /**
10
     *
11
     * @param string $file
12
     * @return boolean
13
     */
14
    protected function isValid($file)
15
    {
16
        return ! is_null(json_decode(@file_get_contents($file)));
17
    }
18
}
19