Failed Conditions
Push — master ( b155cb...bf56a7 )
by Struan
05:04
created

Statement   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
c 2
b 0
f 0
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A link() 0 2 1
1
<?php
2
/**
3
 * Mirrors pydantic model for deseralisation in a PHP context.
4
 * For adding display related helper functions.
5
 * @package TheyWorkForYou
6
 */
7
8
declare(strict_types=1);
9
10
namespace MySociety\TheyWorkForYou\DataClass\Statements;
11
12
use MySociety\TheyWorkForYou\DataClass\BaseModel;
13
14
class Statement extends BaseModel {
15
    public string $title;
16
    public string $info_source;
17
    public string $chamber_slug;
18
    public string $type;
19
    public int $id;
20
    public string $slug;
21
    public string $date;
22
    public int $total_signatures;
23
24
    public function link() {
25
        return "https://votes.theyworkforyou.com/statement/" . $this->chamber_slug . '/' . $this->date . '/' . $this->slug;
26
    }
27
}
28