Completed
Branch master (9de2b1)
by Dominik
03:28 queued 01:13
created

ScalarNode   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getDefault() 0 4 1
A serialize() 0 4 1
1
<?php
2
3
namespace Saxulum\ElasticSearchQueryBuilder\Node;
4
5
class ScalarNode extends AbstractNode
6
{
7
    /**
8
     * @var string|float|int|bool|null
9
     */
10
    protected $value;
11
12
    /**
13
     * @param string|float|int|bool|null $value
14
     */
15
    public function __construct($value)
16
    {
17
        $this->value = $value;
18
    }
19
20
    /**
21
     */
22
    public function getDefault()
23
    {
24
        return;
25
    }
26
27
    /**
28
     * @return string|float|int|bool|null
29
     */
30
    public function serialize()
31
    {
32
        return $this->value;
33
    }
34
}
35