Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
20 | class PreferenceChannelsType extends AbstractType |
||
21 | { |
||
22 | /** |
||
23 | * @var LeadModel |
||
24 | */ |
||
25 | private $leadModel; |
||
26 | |||
27 | public function __construct(LeadModel $leadModel) |
||
28 | { |
||
29 | $this->leadModel = $leadModel; |
||
30 | } |
||
31 | |||
32 | public function configureOptions(OptionsResolver $resolver) |
||
33 | { |
||
34 | $model = $this->leadModel; |
||
35 | |||
36 | $resolver->setDefaults( |
||
37 | [ |
||
38 | 'choices' => function (Options $options) use ($model) { |
||
|
|||
39 | return $model->getPreferenceChannels(); |
||
40 | }, |
||
41 | 'placeholder' => '', |
||
42 | 'attr' => ['class' => 'form-control'], |
||
43 | 'label_attr' => ['class' => 'control-label'], |
||
44 | 'multiple' => false, |
||
45 | 'expanded' => false, |
||
46 | 'required' => false, |
||
47 | ] |
||
48 | ); |
||
49 | } |
||
50 | |||
51 | public function getParent() |
||
54 | } |
||
55 | } |
||
56 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.