Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
12 / 12
100.00% covered (success)
100.00%
9 / 9
CRAP
100.00% covered (success)
100.00%
1 / 1
Flags
100.00% covered (success)
100.00%
12 / 12
100.00% covered (success)
100.00%
9 / 9
9
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
 getEnabled
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setEnabled
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getDeleted
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setDeleted
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getHidden
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setHidden
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getGlobal
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setGlobal
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace MediaWiki\Extension\AbuseFilter\Filter;
4
5/**
6 * (Mutable) value object to represent flags that can be *manually* set on a filter.
7 */
8class Flags {
9    /** @var bool */
10    private $enabled;
11    /** @var bool */
12    private $deleted;
13    /** @var bool */
14    private $hidden;
15    /** @var bool */
16    private $global;
17
18    /**
19     * @param bool $enabled
20     * @param bool $deleted
21     * @param bool $hidden
22     * @param bool $global
23     */
24    public function __construct( bool $enabled, bool $deleted, bool $hidden, bool $global ) {
25        $this->enabled = $enabled;
26        $this->deleted = $deleted;
27        $this->hidden = $hidden;
28        $this->global = $global;
29    }
30
31    /**
32     * @return bool
33     */
34    public function getEnabled(): bool {
35        return $this->enabled;
36    }
37
38    /**
39     * @param bool $enabled
40     */
41    public function setEnabled( bool $enabled ): void {
42        $this->enabled = $enabled;
43    }
44
45    /**
46     * @return bool
47     */
48    public function getDeleted(): bool {
49        return $this->deleted;
50    }
51
52    /**
53     * @param bool $deleted
54     */
55    public function setDeleted( bool $deleted ): void {
56        $this->deleted = $deleted;
57    }
58
59    /**
60     * @return bool
61     */
62    public function getHidden(): bool {
63        return $this->hidden;
64    }
65
66    /**
67     * @param bool $hidden
68     */
69    public function setHidden( bool $hidden ): void {
70        $this->hidden = $hidden;
71    }
72
73    /**
74     * @return bool
75     */
76    public function getGlobal(): bool {
77        return $this->global;
78    }
79
80    /**
81     * @param bool $global
82     */
83    public function setGlobal( bool $global ): void {
84        $this->global = $global;
85    }
86}