1 | <?php |
||
11 | class ThreemaGateway_Handler_Action_TfaCallback_TextMessage extends ThreemaGateway_Handler_Action_TfaCallback_Abstract |
||
12 | { |
||
13 | /** |
||
14 | * @var int replace chars in the string |
||
15 | */ |
||
16 | const FILTER_REPLACE = 1; |
||
17 | |||
18 | /** |
||
19 | * @var int regular expression match, can only succeed or fail |
||
20 | */ |
||
21 | const FILTER_REGEX_MATCH = 10; |
||
22 | |||
23 | /** |
||
24 | * @var string text of Threema message |
||
25 | */ |
||
26 | protected $msgText; |
||
27 | |||
28 | /** |
||
29 | * Prepare the message handling. Should be called before any other actions. |
||
30 | * |
||
31 | * @return bool |
||
32 | */ |
||
33 | public function prepareProcessing() |
||
39 | |||
40 | /** |
||
41 | * Filters the passed data/message. |
||
42 | * |
||
43 | * Returns "false" if the process should be canceled. Otherwise "true". |
||
44 | * |
||
45 | * @param int $filterType please use the constants FILTER_* |
||
46 | * @param mixed $filterData any data the filter uses |
||
47 | * @param bool $failOnError whether the filter should fail on errors (true) |
||
48 | * or silently ignore them (false) |
||
49 | * |
||
50 | * @throws XenForo_Exception |
||
51 | * @return bool |
||
52 | */ |
||
53 | protected function applyFilter($filterType, $filterData, $failOnError = true) |
||
84 | |||
85 | /** |
||
86 | * Does all steps needed to do before processing data. |
||
87 | * |
||
88 | * Returns "false" if the process should be canceled. Otherwise "true". |
||
89 | * |
||
90 | * @throws XenForo_Exception |
||
91 | * @return bool |
||
92 | */ |
||
93 | protected function preProcessPending() |
||
102 | |||
103 | /** |
||
104 | * Verifies & saves data for one confirm request. |
||
105 | * |
||
106 | * Returns "false" if the process should be canceled. Otherwise "true". |
||
107 | * |
||
108 | * @param array $processOptions please include 'saveKey' |
||
109 | * |
||
110 | * @return bool |
||
111 | */ |
||
112 | protected function processConfirmRequest($confirmRequest, array $processOptions = []) |
||
132 | } |
||
133 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.