Field   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getValue() 0 4 1
A matches() 0 4 1
1
<?php
2
3
namespace TomPHP\HalClient\Resource;
4
5
final class Field implements FieldNode
6
{
7
    /** @var string */
8
    private $value;
9
10
    /**
11
     * @param string $value
12
     */
13
    public function __construct($value)
14
    {
15
        $this->value = $value;
16
    }
17
18
    /** @return string */
19
    public function getValue()
20
    {
21
        return $this->value;
22
    }
23
24
    public function matches($criteria)
25
    {
26
        return $this->value == $criteria;
27
    }
28
}
29