Conditions | 1 |
Paths | 1 |
Total Lines | 25 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function behaviors() |
||
29 | { |
||
30 | return ArrayHelper::merge( |
||
31 | parent::behaviors(), |
||
32 | [ |
||
33 | 'error' => [ |
||
34 | 'default' => 'save' |
||
35 | ], |
||
36 | 'redirect' => [ |
||
37 | 'only' => ['save'], |
||
38 | 'actions' => [ |
||
39 | 'save' => [200] |
||
40 | ] |
||
41 | ], |
||
42 | 'flash' => [ |
||
43 | 'actions' => [ |
||
44 | 'save' => [ |
||
45 | 200 => \Craft::t('saml-sp', "Settings successfully updated."), |
||
46 | 401 => \Craft::t('saml-sp', "Failed to update settings.") |
||
47 | ] |
||
48 | ] |
||
49 | ] |
||
50 | ] |
||
51 | ); |
||
52 | } |
||
53 | |||
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.