StatSite::setDropWWWPrefixAttribute()   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 StatSite extends DataTransferObject
8
{
9
    protected $casts = [
10
        'id' => 'integer',
11
        'project_id' => 'integer',
12
        'total_keywords' => 'integer',
13
        'drop_www_prefix' => 'boolean',
14
        'drop_directories' => 'boolean',
15
    ];
16
17
    public function setDropWWWPrefixAttribute($value)
18
    {
19
        return $this->attributes['drop_www_prefix'] = (bool) $value;
20
    }
21
22
    public function setDropDirectoriesAttribute($value)
23
    {
24
        return $this->attributes['drop_directories'] = (bool) $value;
25
    }
26
}
27