Completed
Push — master ( ec87e5...4069b9 )
by Siro Díaz
02:09
created

TrieNode::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 2
1
<?php
2
/**
3
 * DataStructures for PHP
4
 *
5
 * @link      https://github.com/SiroDiaz/DataStructures
6
 * @copyright Copyright (c) 2017 Siro Díaz Palazón
7
 * @license   https://github.com/SiroDiaz/DataStructures/blob/master/README.md (MIT License)
8
 */
9
namespace DataStructures\Trees\Nodes;
10
11
/**
12
 * TrieNode.
13
 *
14
 * The TrieNode class represents the trie node. It uses an array to store all
15
 * children nodes.
16
 *
17
 * @author Siro Diaz Palazon <[email protected]>
18
 */
19
class TrieNode {
20
    public $char;
21
    public $isWord;
22
    public $children;
23
24
    public function __construct($char = '', $isWord = false) {
25
        $this->char = $char;
26
        $this->isWord = $isWord;
27
        $this->children = [];
28
    }
29
}