1 | <?php |
||
10 | trait Trait_RuleWithField |
||
11 | { |
||
12 | /** @var string $field The field to apply the rule on */ |
||
13 | protected $field; |
||
14 | |||
15 | /** |
||
16 | * @return string $field |
||
17 | */ |
||
18 | 301 | final public function getField() |
|
22 | |||
23 | /** |
||
24 | * @return string $field |
||
|
|||
25 | */ |
||
26 | 9 | final public function setField( $field ) |
|
42 | |||
43 | /** |
||
44 | * Changes the field property of the rule. |
||
45 | * |
||
46 | * @param array|callable Associative array of renamings or callable |
||
47 | * that would rename the fields. |
||
48 | * |
||
49 | * @return AbstractAtomicRule $this |
||
50 | */ |
||
51 | final public function renameField($renamings) |
||
56 | |||
57 | /** |
||
58 | * Changes the field property of the rule. |
||
59 | * |
||
60 | * @param array|callable Associative array of renamings or callable |
||
61 | * that would rename the fields. |
||
62 | * |
||
63 | * @return bool Whether or not the field changed |
||
64 | */ |
||
65 | 1 | final public function renameFields_andReturnIsChanged($renamings) |
|
94 | |||
95 | /**/ |
||
96 | } |
||
97 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.