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

Statement::link()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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