StatFrequentDomain   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

3 Methods

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