Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function safeUp() |
||
25 | { |
||
26 | $table = $this->getDb()->getSchema()->getTableSchema( |
||
|
|||
27 | UserAssociation::tableName() |
||
28 | ); |
||
29 | |||
30 | $states = array_keys(Organizations::getInstance()->getSettings()->getUserStates()); |
||
31 | $defaultState = Organizations::getInstance()->getSettings()->getDefaultUserState(); |
||
32 | |||
33 | $type = $this->enum( |
||
34 | AlterUserStates::COLUMN_NAME, |
||
35 | $states |
||
36 | )->defaultValue($defaultState)->notNull(); |
||
37 | |||
38 | $this->alterColumn( |
||
39 | UserAssociation::tableName(), |
||
40 | AlterUserStates::COLUMN_NAME, |
||
41 | $type |
||
42 | ); |
||
43 | } |
||
44 | |||
54 |
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.