ErrorFreePhpParser   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 10
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A parse() 0 8 2
1
<?php
2
3
namespace Padawan\Parser;
4
5
use PhpParser\Parser\Php5 as ASTGenerator;
6
7
class ErrorFreePhpParser extends ASTGenerator {
8
    public function parse($content) {
9
        try {
10
            return parent::parse($content);
11
        }
12
        catch (\Exception $e) {
13
            return $this->semValue;
14
        }
15
    }
16
}
17