Total Complexity | 5 |
Total Lines | 67 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
14 | final class BookmarkAdmin extends AbstractAdmin |
||
15 | { |
||
16 | protected $datagridValues = [ |
||
17 | '_page' => 1, |
||
18 | '_sort_order' => 'DESC', |
||
19 | '_sort_by' => 'created', |
||
20 | ]; |
||
21 | |||
22 | protected function configureDatagridFilters(DatagridMapper $datagridMapper): void |
||
23 | { |
||
24 | $datagridMapper |
||
25 | ->add('id') |
||
26 | ->add('title') |
||
27 | ->add('timeInSeconds') |
||
28 | ->add('lesson') |
||
29 | ->add('created') |
||
30 | ->add('updated') |
||
31 | ; |
||
32 | } |
||
33 | |||
34 | protected function configureListFields(ListMapper $listMapper): void |
||
35 | { |
||
36 | $listMapper |
||
37 | ->add('id') |
||
38 | ->add('title') |
||
39 | ->add('timeInSeconds') |
||
40 | ->add('lesson') |
||
41 | ->add('created') |
||
42 | ->add('updated') |
||
43 | ->add('_action', null, [ |
||
44 | 'actions' => [ |
||
45 | 'show' => [], |
||
46 | 'edit' => [], |
||
47 | 'delete' => [], |
||
48 | ], |
||
49 | ]); |
||
50 | } |
||
51 | |||
52 | protected function configureFormFields(FormMapper $formMapper): void |
||
53 | { |
||
54 | $formMapper |
||
55 | ->add('title') |
||
56 | ->add('timeInSeconds') |
||
57 | ->add('lesson') |
||
58 | ; |
||
59 | } |
||
60 | |||
61 | protected function configureShowFields(ShowMapper $showMapper): void |
||
69 | ; |
||
70 | } |
||
71 | |||
72 | public function createQuery($context = 'list') |
||
81 | } |
||
82 | } |
||
83 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: