Completed
Push — master ( c80620...0cd8d9 )
by Martijn
03:25
created

Failure   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __get() 0 3 2
A __toString() 0 3 1
1
<?php
2
3
namespace Vanderlee\Comprehend\Match;
4
5
/**
6
 * Result of a failed parse
7
 *
8
 * @author Martijn
9
 */
10
class Failure extends Match
11
{
12
13
    public function __get($name)
14
    {
15
        return $name === 'match' ? false : parent::__get($name);
16
    }
17
18
    public function __toString()
19
    {
20
        return 'Failed match at ' . $this->length . ' characters';
21
    }
22
23
}
24