LalrResult   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
/**
3
 * This file is part of PHP-Yacc package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
declare(strict_types=1);
9
10
namespace PhpYacc\Lalr;
11
12
/**
13
 * Class LalrResult.
14
 */
15
class LalrResult
16
{
17
    /**
18
     * @var array
19
     */
20
    public $grams;
21
22
    /**
23
     * @var int
24
     */
25
    public $countStates = 0;
26
27
    /**
28
     * @var array
29
     */
30
    public $states;
31
32
    /**
33
     * @var string
34
     */
35
    public $output;
36
37
    /**
38
     * @var int
39
     */
40
    public $countNonLeafStates;
41
42
    /**
43
     * LalrResult constructor.
44
     *
45
     * @param array  $grams
46
     * @param array  $states
47
     * @param int    $countNonLeafStates
48
     * @param string $output
49
     */
50
    public function __construct(array $grams, array $states, int $countNonLeafStates, string $output)
51
    {
52
        $this->grams = $grams;
53
        $this->states = $states;
54
        $this->countStates = \count($states);
55
        $this->output = $output;
56
        $this->countNonLeafStates = $countNonLeafStates;
57
    }
58
}
59