| 1 | <?php |
||
| 12 | class DatetimeTest extends DriverFieldKernelTestBase |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * {@inheritdoc} |
||
| 17 | */ |
||
| 18 | public static $modules = ['entity_test', 'field', 'datetime']; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Machine name of the field type being tested. |
||
| 22 | * |
||
| 23 | * @string |
||
| 24 | */ |
||
| 25 | protected $fieldType = 'datetime'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Test an absolute value for a datetime field. |
||
| 29 | */ |
||
| 30 | public function testDatetimeAbsolute() |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Test a relative value in a datetime field. |
||
| 39 | */ |
||
| 40 | public function testDatetimeRelative() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Test an absolute value for a date-only datetime field. |
||
| 49 | */ |
||
| 50 | public function testDateOnly() |
||
| 56 | } |
||
| 57 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.