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

Failure::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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