Completed
Push — master ( 0a933f...8a8a33 )
by Ma
02:04
created

HasWord   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A ifStringEnd() 0 4 2
A childIsInvalid() 0 8 1
1
<?php
2
namespace Autocomplete\Container\Trie\Method;
3
4
class HasWord extends Template
5
{
6
7
    public function ifStringEnd()
8
    {
9
        return $this->child->getEndNode() ? true : false;
10
    }
11
12
    public function childIsInvalid(&$prevChild)
13
    {
14
        return 
15
        [
16
            'return' => true,
17
            'returnValue' => false
18
        ];
19
    }
20
}