| Total Complexity | 2 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | #[Attribute(Attribute::TARGET_PROPERTY)] |
||
| 24 | class DatagridField extends AbstractField implements PositionAnnotationInterface |
||
| 25 | { |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Filtering options. |
||
| 29 | * |
||
| 30 | * @var array |
||
| 31 | */ |
||
| 32 | public array $filterOptions = []; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Datagrid form field type options. |
||
| 36 | * |
||
| 37 | * @var array |
||
| 38 | */ |
||
| 39 | public array $fieldOptions = []; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * {@inheritDoc} |
||
| 43 | * |
||
| 44 | * @param array $filterOptions Filtering options. |
||
| 45 | * @param array $fieldOptions Datagrid form field type options. |
||
| 46 | * |
||
| 47 | * @throws ReflectionException |
||
| 48 | */ |
||
| 49 | public function __construct( |
||
| 50 | $type = null, |
||
| 51 | array $fieldDescriptionOptions = [], |
||
| 52 | ?int $position = null, |
||
| 53 | array $filterOptions = [], |
||
|
|
|||
| 54 | array $fieldOptions = [] |
||
| 55 | ) { |
||
| 56 | $this->filterOptions = $fieldOptions; |
||
| 57 | $this->fieldOptions = $fieldOptions; |
||
| 58 | |||
| 59 | parent::__construct($type, $fieldDescriptionOptions, $position); |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Get field settings. |
||
| 64 | * |
||
| 65 | * @return array |
||
| 66 | */ |
||
| 67 | public function getSettings(): array |
||
| 74 | ]; |
||
| 75 | } |
||
| 78 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.