Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
19 | public function up(Schema $schema) |
||
20 | { |
||
21 | $db = $this->connection->getDatabasePlatform()->getName(); |
||
22 | $table = $schema->getTable('short_urls'); |
||
23 | $column = $table->getColumn('short_code'); |
||
24 | |||
25 | if ($db === self::MYSQL) { |
||
26 | $column->setPlatformOption('collation', 'utf8_bin'); |
||
27 | } elseif ($db === self::SQLITE) { |
||
28 | $column->setPlatformOption('collate', 'BINARY'); |
||
29 | } |
||
30 | } |
||
31 | |||
40 |
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.