ExampleTableNode   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 81.82%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 56
ccs 9
cts 11
cp 0.8182
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getNodeType() 0 4 1
A getTags() 0 4 1
A getKeyword() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Behat Gherkin.
5
 * (c) Konstantin Kudryashov <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Behat\Gherkin\Node;
12
13
/**
14
 * Represents Gherkin Outline Example Table.
15
 *
16
 * @author Konstantin Kudryashov <[email protected]>
17
 */
18
class ExampleTableNode extends TableNode
19
{
20
    /**
21
     * @var string[]
22
     */
23
    private $tags;
24
25
    /**
26
     * @var string
27
     */
28
    private $keyword;
29
30
    /**
31
     * Initializes example table.
32
     *
33
     * @param array $table Table in form of [$rowLineNumber => [$val1, $val2, $val3]]
34
     * @param string $keyword
35
     * @param string[] $tags
36
     */
37 226
    public function __construct(array $table, $keyword, array $tags = array())
38
    {
39 226
        $this->keyword = $keyword;
40 226
        $this->tags = $tags;
41
42 226
        parent::__construct($table);
43 226
    }
44
45
    /**
46
     * Returns node type string
47
     *
48
     * @return string
49
     */
50
    public function getNodeType()
51
    {
52
        return 'ExampleTable';
53
    }
54
55
    /**
56
     * Returns attached tags
57
     * @return \string[]
58
     */
59 8
    public function getTags()
60
    {
61 8
        return $this->tags;
62
    }
63
64
    /**
65
     * Returns example table keyword.
66
     *
67
     * @return string
68
     */
69 11
    public function getKeyword()
70
    {
71 11
        return $this->keyword;
72
    }
73
}
74