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

TrieNode   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
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
}