FieldSanitizer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
sanitize() 0 1 ?
isLive() 0 1 ?
A isRealtime() 0 4 1
A getJsonData() 0 8 1
1
<?php
2
3
namespace fieldwork\sanitizers;
4
5
use fieldwork\Synchronizable;
6
7
abstract class FieldSanitizer implements Synchronizable
8
{
9
10
    public abstract function sanitize ($value);
11
12
    public abstract function isLive ();
13
14
    public function isRealtime ()
15
    {
16
        return true;
17
    }
18
19
    public function getJsonData ()
20
    {
21
        return array(
22
            'method'   => $this->describeObject(),
23
            'live'     => $this->isLive(),
24
            'realtime' => $this->isRealtime()
25
        );
26
    }
27
28
}