Xml   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A isValid() 0 9 2
1
<?php
2
namespace Health\Checks\File;
3
4
use Health\Checks\HealthCheckInterface;
5
6
class Xml extends Base implements HealthCheckInterface
7
{
8
9
    /**
10
     *
11
     * @param string $file
12
     * @return boolean
13
     */
14
    protected function isValid($file)
15
    {
16
        $doc = new \DOMDocument();
17
18
        if (! @$doc->load($file)) {
19
            return false;
20
        }
21
22
        return true;
23
    }
24
}
25