Completed
Push — master ( ae4bd7...74685b )
by Felix
02:37
created

StatFrequentDomain   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setTopTenResultsAttribute() 0 4 1
A setResultsAnalyzedAttribute() 0 4 1
A setCoverageAttribute() 0 4 1
1
<?php namespace SchulzeFelix\Stat\Objects;
2
3
use SchulzeFelix\DataTransferObject\DataTransferObject;
4
5
class StatFrequentDomain extends DataTransferObject
6
{
7
    protected $casts = [
8
        'top_ten_results' => 'integer',
9
        'results_analyzed' => 'integer',
10
        'coverage' => 'float',
11
        'analyzed_on' => 'date',
12
    ];
13
14
    public function setTopTenResultsAttribute($value)
15
    {
16
        return $this->attributes['top_ten_results'] = (int)$value;
17
    }
18
19
    public function setResultsAnalyzedAttribute($value)
20
    {
21
        return $this->attributes['results_analyzed'] = (int)$value;
22
    }
23
24
    public function setCoverageAttribute($value)
25
    {
26
        return $this->attributes['coverage'] = (float)$value;
27
    }
28
}
29