Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
15 / 15
100.00% covered (success)
100.00%
11 / 11
CRAP
100.00% covered (success)
100.00%
1 / 1
Specs
100.00% covered (success)
100.00%
15 / 15
100.00% covered (success)
100.00%
11 / 11
11
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
1
 getRules
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setRules
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getComments
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setComments
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getName
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setName
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getActionsNames
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setActionsNames
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getGroup
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setGroup
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 that represents the "specs" of a filter.
7 */
8class Specs {
9    /** @var string */
10    private $rules;
11    /** @var string */
12    private $comments;
13    /** @var string */
14    private $name;
15    /** @var string[] */
16    private $actionsNames;
17    /** @var string */
18    private $group;
19
20    /**
21     * @param string $rules
22     * @param string $comments
23     * @param string $name
24     * @param string[] $actionsNames
25     * @param string $group
26     */
27    public function __construct( string $rules, string $comments, string $name, array $actionsNames, string $group ) {
28        $this->rules = $rules;
29        $this->comments = $comments;
30        $this->name = $name;
31        $this->actionsNames = $actionsNames;
32        $this->group = $group;
33    }
34
35    public function getRules(): string {
36        return $this->rules;
37    }
38
39    public function setRules( string $rules ): void {
40        $this->rules = $rules;
41    }
42
43    public function getComments(): string {
44        return $this->comments;
45    }
46
47    public function setComments( string $comments ): void {
48        $this->comments = $comments;
49    }
50
51    public function getName(): string {
52        return $this->name;
53    }
54
55    public function setName( string $name ): void {
56        $this->name = $name;
57    }
58
59    /**
60     * @return string[]
61     */
62    public function getActionsNames(): array {
63        return $this->actionsNames;
64    }
65
66    /**
67     * @param string[] $actionsNames
68     */
69    public function setActionsNames( array $actionsNames ): void {
70        $this->actionsNames = $actionsNames;
71    }
72
73    public function getGroup(): string {
74        return $this->group;
75    }
76
77    public function setGroup( string $group ): void {
78        $this->group = $group;
79    }
80}