Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
19 | protected function configureFormFields(FormMapper $formMapper) |
||
20 | { |
||
21 | parent::configureFormFields($formMapper); |
||
22 | |||
23 | $mediaField = $field = $formMapper->get('media'); |
||
|
|||
24 | $options = $mediaField->getFormConfig()->getOptions(); |
||
25 | $options['btn_delete'] = false; |
||
26 | |||
27 | $formMapper |
||
28 | ->remove('enabled') |
||
29 | ->remove('position') |
||
30 | ->add('title', null, ['label' => 'Title', 'attr' => ['style' => 'height: 150px']]) |
||
31 | ->add('description', null, ['attr' => ['style' => 'height: 150px; width: 400px']]) |
||
32 | ->add('media', ModelListType::class, $options) |
||
33 | ; |
||
34 | } |
||
35 | } |
||
36 |
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.