1 | <?php |
||
21 | abstract class AbstractSettingsController extends AbstractController |
||
22 | { |
||
23 | use EnsureSamlPlugin; |
||
24 | |||
25 | /** |
||
26 | * @return array |
||
27 | */ |
||
28 | public function behaviors() |
||
53 | |||
54 | /** |
||
55 | * @return array |
||
56 | */ |
||
57 | protected function verbs(): array |
||
63 | |||
64 | /** |
||
65 | * @return mixed |
||
66 | * @throws \yii\base\InvalidConfigException |
||
67 | */ |
||
68 | public function actionSave() |
||
84 | |||
85 | /** |
||
86 | * @return bool |
||
87 | * @throws \yii\web\ForbiddenHttpException |
||
88 | */ |
||
89 | public function checkUpdateAccess(): bool |
||
93 | } |
||
94 |
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.