StatFrequentDomain::setResultsAnalyzedAttribute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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