ParseResult   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 38
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getParams() 0 4 1
A getMatchLength() 0 4 1
1
<?php
2
/**
3
 * Dash
4
 *
5
 * @link      http://github.com/DASPRiD/Dash For the canonical source repository
6
 * @copyright 2013-2015 Ben Scholzen 'DASPRiD'
7
 * @license   http://opensource.org/licenses/BSD-2-Clause Simplified BSD License
8
 */
9
10
namespace Dash\Parser;
11
12
/**
13
 * A generic parse result which is returned by parsers.
14
 */
15
class ParseResult
16
{
17
    /**
18
     * @var array
19
     */
20
    protected $params;
21
22
    /**
23
     * @var int
24
     */
25
    protected $matchLength;
26
27
    /**
28
     * @param array $params
29
     * @param int   $matchLength
30
     */
31
    public function __construct(array $params, $matchLength)
32
    {
33
        $this->params      = $params;
34
        $this->matchLength = (int) $matchLength;
35
    }
36
37
    /**
38
     * @return array
39
     */
40
    public function getParams()
41
    {
42
        return $this->params;
43
    }
44
45
    /**
46
     * @return int
47
     */
48
    public function getMatchLength()
49
    {
50
        return $this->matchLength;
51
    }
52
}
53