| 1 | <?php namespace PascalKleindienst\FormListGenerator\Fields; |
||
| 7 | class FieldFactory |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Custom Field Types |
||
| 11 | * @var array |
||
| 12 | */ |
||
| 13 | public $customFields = []; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Set Custom fields |
||
| 17 | * |
||
| 18 | * @param array $fields |
||
| 19 | */ |
||
| 20 | 33 | public function __construct(array $fields = []) |
|
| 24 | |||
| 25 | /** |
||
| 26 | * Create new Field class. |
||
| 27 | * |
||
| 28 | * @param string $name |
||
| 29 | * @param array $config |
||
| 30 | * @return \PascalKleindienst\FormListGenerator\Data\Field |
||
| 31 | */ |
||
| 32 | 27 | public function create($name, array $config) |
|
| 59 | } |
||
| 60 |
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.