From c1b8120ceb2eea125a7e95ce048eb92bf4c7296d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Wr=C3=B3blewski?= Date: Sun, 11 Feb 2024 02:04:35 +0100 Subject: [PATCH] chore: github actions --- src/Action/Type/ResolvedActionTypeFactory.php | 2 +- .../Type/ResolvedActionTypeFactoryInterface.php | 2 +- src/Column/Column.php | 8 ++++---- src/Column/ColumnConfigBuilder.php | 4 ++-- src/Column/ColumnConfigBuilderInterface.php | 4 ++-- src/Column/ColumnInterface.php | 8 ++++---- src/Column/Type/ResolvedColumnType.php | 8 ++++---- src/Column/Type/ResolvedColumnTypeFactory.php | 2 +- .../Type/ResolvedColumnTypeFactoryInterface.php | 2 +- src/Column/Type/ResolvedColumnTypeInterface.php | 8 ++++---- src/DataTable.php | 8 ++++---- src/DataTableBuilder.php | 12 ++++++------ src/DataTableBuilderInterface.php | 12 ++++++------ src/DataTableInterface.php | 8 ++++---- src/Exporter/Type/ResolvedExporterTypeFactory.php | 2 +- .../Type/ResolvedExporterTypeFactoryInterface.php | 2 +- src/Filter/Filter.php | 2 +- src/Filter/Type/ResolvedFilterTypeFactory.php | 2 +- .../Type/ResolvedFilterTypeFactoryInterface.php | 2 +- src/Sorting/SortingColumnData.php | 4 ++-- src/Test/Filter/FilterTypeTestCase.php | 2 +- src/Type/ResolvedDataTableType.php | 2 +- src/Type/ResolvedDataTableTypeFactory.php | 2 +- src/Type/ResolvedDataTableTypeFactoryInterface.php | 2 +- src/Type/ResolvedDataTableTypeInterface.php | 2 +- .../CallbackExpressionTransformerTest.php | 2 +- 26 files changed, 57 insertions(+), 57 deletions(-) diff --git a/src/Action/Type/ResolvedActionTypeFactory.php b/src/Action/Type/ResolvedActionTypeFactory.php index 07a23f45..98e9c099 100755 --- a/src/Action/Type/ResolvedActionTypeFactory.php +++ b/src/Action/Type/ResolvedActionTypeFactory.php @@ -6,7 +6,7 @@ class ResolvedActionTypeFactory implements ResolvedActionTypeFactoryInterface { - public function createResolvedType(ActionTypeInterface $type, array $typeExtensions = [], ResolvedActionTypeInterface $parent = null): ResolvedActionTypeInterface + public function createResolvedType(ActionTypeInterface $type, array $typeExtensions = [], ?ResolvedActionTypeInterface $parent = null): ResolvedActionTypeInterface { return new ResolvedActionType($type, $typeExtensions, $parent); } diff --git a/src/Action/Type/ResolvedActionTypeFactoryInterface.php b/src/Action/Type/ResolvedActionTypeFactoryInterface.php index fb6190a0..1ebb3e76 100755 --- a/src/Action/Type/ResolvedActionTypeFactoryInterface.php +++ b/src/Action/Type/ResolvedActionTypeFactoryInterface.php @@ -11,5 +11,5 @@ interface ResolvedActionTypeFactoryInterface /** * @param array $typeExtensions */ - public function createResolvedType(ActionTypeInterface $type, array $typeExtensions = [], ResolvedActionTypeInterface $parent = null): ResolvedActionTypeInterface; + public function createResolvedType(ActionTypeInterface $type, array $typeExtensions = [], ?ResolvedActionTypeInterface $parent = null): ResolvedActionTypeInterface; } diff --git a/src/Column/Column.php b/src/Column/Column.php index fda4f070..6964ce7b 100755 --- a/src/Column/Column.php +++ b/src/Column/Column.php @@ -72,7 +72,7 @@ public function getSortPropertyPath(): ?PropertyPathInterface return $this->sortPropertyPath = $this->getPropertyPath(); } - public function createHeaderView(HeaderRowView $parent = null): ColumnHeaderView + public function createHeaderView(?HeaderRowView $parent = null): ColumnHeaderView { $view = $this->config->getType()->createHeaderView($this, $parent); @@ -81,7 +81,7 @@ public function createHeaderView(HeaderRowView $parent = null): ColumnHeaderView return $view; } - public function createValueView(ValueRowView $parent = null): ColumnValueView + public function createValueView(?ValueRowView $parent = null): ColumnValueView { $view = $this->config->getType()->createValueView($this, $parent); @@ -90,7 +90,7 @@ public function createValueView(ValueRowView $parent = null): ColumnValueView return $view; } - public function createExportHeaderView(HeaderRowView $parent = null): ColumnHeaderView + public function createExportHeaderView(?HeaderRowView $parent = null): ColumnHeaderView { $view = $this->config->getType()->createExportHeaderView($this, $parent); @@ -99,7 +99,7 @@ public function createExportHeaderView(HeaderRowView $parent = null): ColumnHead return $view; } - public function createExportValueView(ValueRowView $parent = null): ColumnValueView + public function createExportValueView(?ValueRowView $parent = null): ColumnValueView { $view = $this->config->getType()->createExportValueView($this, $parent); diff --git a/src/Column/ColumnConfigBuilder.php b/src/Column/ColumnConfigBuilder.php index 0582ba09..96610803 100755 --- a/src/Column/ColumnConfigBuilder.php +++ b/src/Column/ColumnConfigBuilder.php @@ -139,7 +139,7 @@ public function getPropertyPath(): ?PropertyPathInterface return $this->propertyPath; } - public function setPropertyPath(null|string|PropertyPathInterface $propertyPath): static + public function setPropertyPath(string|PropertyPathInterface|null $propertyPath): static { if ($this->locked) { throw $this->createBuilderLockedException(); @@ -159,7 +159,7 @@ public function getSortPropertyPath(): ?PropertyPathInterface return $this->sortPropertyPath; } - public function setSortPropertyPath(null|string|PropertyPathInterface $sortPropertyPath): static + public function setSortPropertyPath(string|PropertyPathInterface|null $sortPropertyPath): static { if ($this->locked) { throw $this->createBuilderLockedException(); diff --git a/src/Column/ColumnConfigBuilderInterface.php b/src/Column/ColumnConfigBuilderInterface.php index 75d041b6..76ca34fc 100755 --- a/src/Column/ColumnConfigBuilderInterface.php +++ b/src/Column/ColumnConfigBuilderInterface.php @@ -30,9 +30,9 @@ public function setAttributes(array $attributes): static; public function setAttribute(string $name, mixed $value): static; - public function setPropertyPath(null|string|PropertyPathInterface $propertyPath): static; + public function setPropertyPath(string|PropertyPathInterface|null $propertyPath): static; - public function setSortPropertyPath(null|string|PropertyPathInterface $sortPropertyPath): static; + public function setSortPropertyPath(string|PropertyPathInterface|null $sortPropertyPath): static; public function setSortable(bool $sortable): static; diff --git a/src/Column/ColumnInterface.php b/src/Column/ColumnInterface.php index 39fad177..cf62cd61 100755 --- a/src/Column/ColumnInterface.php +++ b/src/Column/ColumnInterface.php @@ -23,13 +23,13 @@ public function getPropertyPath(): ?PropertyPathInterface; public function getSortPropertyPath(): ?PropertyPathInterface; - public function createHeaderView(HeaderRowView $parent = null): ColumnHeaderView; + public function createHeaderView(?HeaderRowView $parent = null): ColumnHeaderView; - public function createValueView(ValueRowView $parent = null): ColumnValueView; + public function createValueView(?ValueRowView $parent = null): ColumnValueView; - public function createExportHeaderView(HeaderRowView $parent = null): ColumnHeaderView; + public function createExportHeaderView(?HeaderRowView $parent = null): ColumnHeaderView; - public function createExportValueView(ValueRowView $parent = null): ColumnValueView; + public function createExportValueView(?ValueRowView $parent = null): ColumnValueView; public function getPriority(): int; diff --git a/src/Column/Type/ResolvedColumnType.php b/src/Column/Type/ResolvedColumnType.php index ee2058b2..ad5e8613 100755 --- a/src/Column/Type/ResolvedColumnType.php +++ b/src/Column/Type/ResolvedColumnType.php @@ -67,22 +67,22 @@ public function createBuilder(ColumnFactoryInterface $factory, string $name, arr return $builder; } - public function createHeaderView(ColumnInterface $column, HeaderRowView $parent = null): ColumnHeaderView + public function createHeaderView(ColumnInterface $column, ?HeaderRowView $parent = null): ColumnHeaderView { return new ColumnHeaderView($parent); } - public function createValueView(ColumnInterface $column, ValueRowView $parent = null): ColumnValueView + public function createValueView(ColumnInterface $column, ?ValueRowView $parent = null): ColumnValueView { return new ColumnValueView($parent); } - public function createExportHeaderView(ColumnInterface $column, HeaderRowView $parent = null): ColumnHeaderView + public function createExportHeaderView(ColumnInterface $column, ?HeaderRowView $parent = null): ColumnHeaderView { return new ColumnHeaderView($parent); } - public function createExportValueView(ColumnInterface $column, ValueRowView $parent = null): ColumnValueView + public function createExportValueView(ColumnInterface $column, ?ValueRowView $parent = null): ColumnValueView { return new ColumnValueView($parent); } diff --git a/src/Column/Type/ResolvedColumnTypeFactory.php b/src/Column/Type/ResolvedColumnTypeFactory.php index 637452bb..0cd53310 100755 --- a/src/Column/Type/ResolvedColumnTypeFactory.php +++ b/src/Column/Type/ResolvedColumnTypeFactory.php @@ -6,7 +6,7 @@ class ResolvedColumnTypeFactory implements ResolvedColumnTypeFactoryInterface { - public function createResolvedType(ColumnTypeInterface $type, array $typeExtensions = [], ResolvedColumnTypeInterface $parent = null): ResolvedColumnTypeInterface + public function createResolvedType(ColumnTypeInterface $type, array $typeExtensions = [], ?ResolvedColumnTypeInterface $parent = null): ResolvedColumnTypeInterface { return new ResolvedColumnType($type, $typeExtensions, $parent); } diff --git a/src/Column/Type/ResolvedColumnTypeFactoryInterface.php b/src/Column/Type/ResolvedColumnTypeFactoryInterface.php index c8f896b7..9cd56da8 100755 --- a/src/Column/Type/ResolvedColumnTypeFactoryInterface.php +++ b/src/Column/Type/ResolvedColumnTypeFactoryInterface.php @@ -11,5 +11,5 @@ interface ResolvedColumnTypeFactoryInterface /** * @param array $typeExtensions */ - public function createResolvedType(ColumnTypeInterface $type, array $typeExtensions = [], ResolvedColumnTypeInterface $parent = null): ResolvedColumnTypeInterface; + public function createResolvedType(ColumnTypeInterface $type, array $typeExtensions = [], ?ResolvedColumnTypeInterface $parent = null): ResolvedColumnTypeInterface; } diff --git a/src/Column/Type/ResolvedColumnTypeInterface.php b/src/Column/Type/ResolvedColumnTypeInterface.php index 45dacfd5..20760d5b 100755 --- a/src/Column/Type/ResolvedColumnTypeInterface.php +++ b/src/Column/Type/ResolvedColumnTypeInterface.php @@ -29,13 +29,13 @@ public function getTypeExtensions(): array; public function createBuilder(ColumnFactoryInterface $factory, string $name, array $options): ColumnBuilderInterface; - public function createHeaderView(ColumnInterface $column, HeaderRowView $parent = null): ColumnHeaderView; + public function createHeaderView(ColumnInterface $column, ?HeaderRowView $parent = null): ColumnHeaderView; - public function createValueView(ColumnInterface $column, ValueRowView $parent = null): ColumnValueView; + public function createValueView(ColumnInterface $column, ?ValueRowView $parent = null): ColumnValueView; - public function createExportHeaderView(ColumnInterface $column, HeaderRowView $parent = null): ColumnHeaderView; + public function createExportHeaderView(ColumnInterface $column, ?HeaderRowView $parent = null): ColumnHeaderView; - public function createExportValueView(ColumnInterface $column, ValueRowView $parent = null): ColumnValueView; + public function createExportValueView(ColumnInterface $column, ?ValueRowView $parent = null): ColumnValueView; public function buildColumn(ColumnBuilderInterface $builder, array $options): void; diff --git a/src/DataTable.php b/src/DataTable.php index c779f50d..4aa7dfaa 100755 --- a/src/DataTable.php +++ b/src/DataTable.php @@ -562,7 +562,7 @@ public function personalize(PersonalizationData $data, bool $persistence = true) $this->dispatch(DataTableEvents::POST_PERSONALIZE, new DataTablePersonalizationEvent($this, $data)); } - public function export(ExportData $data = null): ExportFile + public function export(?ExportData $data = null): ExportFile { if (!$this->config->isExportingEnabled()) { throw new RuntimeException('The data table has exporting feature disabled.'); @@ -696,7 +696,7 @@ public function setExportData(?ExportData $exportData): static return $this; } - public function createFiltrationFormBuilder(DataTableView $view = null): FormBuilderInterface + public function createFiltrationFormBuilder(?DataTableView $view = null): FormBuilderInterface { if (!$this->config->isFiltrationEnabled()) { throw new RuntimeException('The data table has filtration feature disabled.'); @@ -712,7 +712,7 @@ public function createFiltrationFormBuilder(DataTableView $view = null): FormBui ); } - public function createPersonalizationFormBuilder(DataTableView $view = null): FormBuilderInterface + public function createPersonalizationFormBuilder(?DataTableView $view = null): FormBuilderInterface { if (!$this->config->isPersonalizationEnabled()) { throw new RuntimeException('The data table has personalization feature disabled.'); @@ -731,7 +731,7 @@ public function createPersonalizationFormBuilder(DataTableView $view = null): Fo ); } - public function createExportFormBuilder(DataTableView $view = null): FormBuilderInterface + public function createExportFormBuilder(?DataTableView $view = null): FormBuilderInterface { if (!$this->config->isExportingEnabled()) { throw new RuntimeException('The data table has export feature disabled.'); diff --git a/src/DataTableBuilder.php b/src/DataTableBuilder.php index d7c33e81..b58fa710 100755 --- a/src/DataTableBuilder.php +++ b/src/DataTableBuilder.php @@ -199,7 +199,7 @@ public function getColumn(string $name): ColumnBuilderInterface throw new InvalidArgumentException(sprintf('The column with the name "%s" does not exist.', $name)); } - public function addColumn(ColumnBuilderInterface|string $column, string $type = null, array $options = []): static + public function addColumn(ColumnBuilderInterface|string $column, ?string $type = null, array $options = []): static { if ($this->locked) { throw $this->createBuilderLockedException(); @@ -267,7 +267,7 @@ public function getFilter(string $name): FilterBuilderInterface throw new InvalidArgumentException(sprintf('The filter with the name "%s" does not exist.', $name)); } - public function addFilter(string|FilterBuilderInterface $filter, string $type = null, array $options = []): static + public function addFilter(string|FilterBuilderInterface $filter, ?string $type = null, array $options = []): static { if ($this->locked) { throw $this->createBuilderLockedException(); @@ -375,7 +375,7 @@ public function getAction(string $name): ActionBuilderInterface throw new InvalidArgumentException(sprintf('The action with the name "%s" does not exist.', $name)); } - public function addAction(string|ActionBuilderInterface $action, string $type = null, array $options = []): static + public function addAction(string|ActionBuilderInterface $action, ?string $type = null, array $options = []): static { if ($this->locked) { throw $this->createBuilderLockedException(); @@ -452,7 +452,7 @@ public function hasBatchAction(string $name): bool return isset($this->batchActions[$name]) || isset($this->unresolvedBatchActions[$name]); } - public function addBatchAction(string|ActionBuilderInterface $action, string $type = null, array $options = []): static + public function addBatchAction(string|ActionBuilderInterface $action, ?string $type = null, array $options = []): static { if ($this->locked) { throw $this->createBuilderLockedException(); @@ -540,7 +540,7 @@ public function hasRowAction(string $name): bool return isset($this->rowActions[$name]) || isset($this->unresolvedRowActions[$name]); } - public function addRowAction(string|ActionBuilderInterface $action, string $type = null, array $options = []): static + public function addRowAction(string|ActionBuilderInterface $action, ?string $type = null, array $options = []): static { if ($this->locked) { throw $this->createBuilderLockedException(); @@ -619,7 +619,7 @@ public function getExporter(string $name): ExporterBuilderInterface throw new InvalidArgumentException(sprintf('The exporter with the name "%s" does not exist.', $name)); } - public function addExporter(string|ExporterBuilderInterface $exporter, string $type = null, array $options = []): static + public function addExporter(string|ExporterBuilderInterface $exporter, ?string $type = null, array $options = []): static { if ($this->locked) { throw $this->createBuilderLockedException(); diff --git a/src/DataTableBuilderInterface.php b/src/DataTableBuilderInterface.php index 1015dbe4..a4f6a6f3 100755 --- a/src/DataTableBuilderInterface.php +++ b/src/DataTableBuilderInterface.php @@ -42,7 +42,7 @@ public function hasColumn(string $name): bool; /** * @param class-string|null $type */ - public function addColumn(ColumnBuilderInterface|string $column, string $type = null, array $options = []): static; + public function addColumn(ColumnBuilderInterface|string $column, ?string $type = null, array $options = []): static; public function removeColumn(string $name): static; @@ -61,7 +61,7 @@ public function hasFilter(string $name): bool; /** * @param class-string|null $type */ - public function addFilter(FilterBuilderInterface|string $filter, string $type = null, array $options = []): static; + public function addFilter(FilterBuilderInterface|string $filter, ?string $type = null, array $options = []): static; public function removeFilter(string $name): static; @@ -88,7 +88,7 @@ public function hasAction(string $name): bool; /** * @param class-string|null $type */ - public function addAction(ActionBuilderInterface|string $action, string $type = null, array $options = []): static; + public function addAction(ActionBuilderInterface|string $action, ?string $type = null, array $options = []): static; public function removeAction(string $name): static; @@ -107,7 +107,7 @@ public function hasBatchAction(string $name): bool; /** * @param class-string|null $type */ - public function addBatchAction(ActionBuilderInterface|string $action, string $type = null, array $options = []): static; + public function addBatchAction(ActionBuilderInterface|string $action, ?string $type = null, array $options = []): static; public function removeBatchAction(string $name): static; @@ -130,7 +130,7 @@ public function hasRowAction(string $name): bool; /** * @param class-string|null $type */ - public function addRowAction(ActionBuilderInterface|string $action, string $type = null, array $options = []): static; + public function addRowAction(ActionBuilderInterface|string $action, ?string $type = null, array $options = []): static; public function removeRowAction(string $name): static; @@ -153,7 +153,7 @@ public function hasExporter(string $name): bool; /** * @param class-string|null $type */ - public function addExporter(ExporterBuilderInterface|string $exporter, string $type = null, array $options = []): static; + public function addExporter(ExporterBuilderInterface|string $exporter, ?string $type = null, array $options = []): static; public function removeExporter(string $name): static; diff --git a/src/DataTableInterface.php b/src/DataTableInterface.php index cda750e1..0a5d7464 100755 --- a/src/DataTableInterface.php +++ b/src/DataTableInterface.php @@ -174,7 +174,7 @@ public function paginate(PaginationData $data): void; public function personalize(PersonalizationData $data): void; - public function export(ExportData $data = null): ExportFile; + public function export(?ExportData $data = null): ExportFile; public function getItems(): iterable; @@ -200,11 +200,11 @@ public function setExportData(?ExportData $exportData): static; public function getExportData(): ?ExportData; - public function createFiltrationFormBuilder(DataTableView $view = null): FormBuilderInterface; + public function createFiltrationFormBuilder(?DataTableView $view = null): FormBuilderInterface; - public function createPersonalizationFormBuilder(DataTableView $view = null): FormBuilderInterface; + public function createPersonalizationFormBuilder(?DataTableView $view = null): FormBuilderInterface; - public function createExportFormBuilder(DataTableView $view = null): FormBuilderInterface; + public function createExportFormBuilder(?DataTableView $view = null): FormBuilderInterface; public function isExporting(): bool; diff --git a/src/Exporter/Type/ResolvedExporterTypeFactory.php b/src/Exporter/Type/ResolvedExporterTypeFactory.php index 01eddbe3..20eafb03 100755 --- a/src/Exporter/Type/ResolvedExporterTypeFactory.php +++ b/src/Exporter/Type/ResolvedExporterTypeFactory.php @@ -6,7 +6,7 @@ class ResolvedExporterTypeFactory implements ResolvedExporterTypeFactoryInterface { - public function createResolvedType(ExporterTypeInterface $type, array $typeExtensions = [], ResolvedExporterTypeInterface $parent = null): ResolvedExporterTypeInterface + public function createResolvedType(ExporterTypeInterface $type, array $typeExtensions = [], ?ResolvedExporterTypeInterface $parent = null): ResolvedExporterTypeInterface { return new ResolvedExporterType($type, $typeExtensions, $parent); } diff --git a/src/Exporter/Type/ResolvedExporterTypeFactoryInterface.php b/src/Exporter/Type/ResolvedExporterTypeFactoryInterface.php index 45216ae7..77314042 100755 --- a/src/Exporter/Type/ResolvedExporterTypeFactoryInterface.php +++ b/src/Exporter/Type/ResolvedExporterTypeFactoryInterface.php @@ -11,5 +11,5 @@ interface ResolvedExporterTypeFactoryInterface /** * @param array $typeExtensions */ - public function createResolvedType(ExporterTypeInterface $type, array $typeExtensions = [], ResolvedExporterTypeInterface $parent = null): ResolvedExporterTypeInterface; + public function createResolvedType(ExporterTypeInterface $type, array $typeExtensions = [], ?ResolvedExporterTypeInterface $parent = null): ResolvedExporterTypeInterface; } diff --git a/src/Filter/Filter.php b/src/Filter/Filter.php index daf49e02..83ac0f28 100755 --- a/src/Filter/Filter.php +++ b/src/Filter/Filter.php @@ -101,7 +101,7 @@ private function dispatch(string $eventName, FilterEvent $event): void /** * @deprecated since 0.15, use {@see Filter::handle()} instead */ - public function apply(ProxyQueryInterface $query = null, FilterData $data = null): void + public function apply(?ProxyQueryInterface $query = null, ?FilterData $data = null): void { $query ??= $this->getDataTable()->getQuery(); diff --git a/src/Filter/Type/ResolvedFilterTypeFactory.php b/src/Filter/Type/ResolvedFilterTypeFactory.php index 99badbc8..f49eb954 100755 --- a/src/Filter/Type/ResolvedFilterTypeFactory.php +++ b/src/Filter/Type/ResolvedFilterTypeFactory.php @@ -6,7 +6,7 @@ class ResolvedFilterTypeFactory implements ResolvedFilterTypeFactoryInterface { - public function createResolvedType(FilterTypeInterface $type, array $typeExtensions = [], ResolvedFilterTypeInterface $parent = null): ResolvedFilterTypeInterface + public function createResolvedType(FilterTypeInterface $type, array $typeExtensions = [], ?ResolvedFilterTypeInterface $parent = null): ResolvedFilterTypeInterface { return new ResolvedFilterType($type, $typeExtensions, $parent); } diff --git a/src/Filter/Type/ResolvedFilterTypeFactoryInterface.php b/src/Filter/Type/ResolvedFilterTypeFactoryInterface.php index d475f539..502ba397 100755 --- a/src/Filter/Type/ResolvedFilterTypeFactoryInterface.php +++ b/src/Filter/Type/ResolvedFilterTypeFactoryInterface.php @@ -11,5 +11,5 @@ interface ResolvedFilterTypeFactoryInterface /** * @param array $typeExtensions */ - public function createResolvedType(FilterTypeInterface $type, array $typeExtensions = [], ResolvedFilterTypeInterface $parent = null): ResolvedFilterTypeInterface; + public function createResolvedType(FilterTypeInterface $type, array $typeExtensions = [], ?ResolvedFilterTypeInterface $parent = null): ResolvedFilterTypeInterface; } diff --git a/src/Sorting/SortingColumnData.php b/src/Sorting/SortingColumnData.php index 51c76d36..3a08fde7 100755 --- a/src/Sorting/SortingColumnData.php +++ b/src/Sorting/SortingColumnData.php @@ -16,7 +16,7 @@ class SortingColumnData public function __construct( private readonly string $name, private string $direction = 'asc', - string|PropertyPathInterface $propertyPath = null, + string|PropertyPathInterface|null $propertyPath = null, ) { $this->setPropertyPath($propertyPath); } @@ -67,7 +67,7 @@ public function getPropertyPath(): PropertyPathInterface return $this->propertyPath; } - public function setPropertyPath(null|string|PropertyPathInterface $propertyPath): void + public function setPropertyPath(string|PropertyPathInterface|null $propertyPath): void { if (is_string($propertyPath)) { $propertyPath = new PropertyPath($propertyPath); diff --git a/src/Test/Filter/FilterTypeTestCase.php b/src/Test/Filter/FilterTypeTestCase.php index eaff9ba0..cdf63cfa 100644 --- a/src/Test/Filter/FilterTypeTestCase.php +++ b/src/Test/Filter/FilterTypeTestCase.php @@ -28,7 +28,7 @@ protected function createNamedFilter(string $name, array $options = []): FilterI return $this->factory->createNamed($name, $this->getTestedType(), $options); } - protected function createFilterView(FilterInterface $filter, FilterData $data = null, DataTableView $parent = null): FilterView + protected function createFilterView(FilterInterface $filter, ?FilterData $data = null, ?DataTableView $parent = null): FilterView { return $filter->createView( data: $data ?? $this->createFilterDataMock(), diff --git a/src/Type/ResolvedDataTableType.php b/src/Type/ResolvedDataTableType.php index 63d38dc1..8db12642 100755 --- a/src/Type/ResolvedDataTableType.php +++ b/src/Type/ResolvedDataTableType.php @@ -52,7 +52,7 @@ public function getTypeExtensions(): array /** * @throws ExceptionInterface */ - public function createBuilder(DataTableFactoryInterface $factory, string $name, ProxyQueryInterface $query = null, array $options = []): DataTableBuilderInterface + public function createBuilder(DataTableFactoryInterface $factory, string $name, ?ProxyQueryInterface $query = null, array $options = []): DataTableBuilderInterface { try { $options = $this->getOptionsResolver()->resolve($options); diff --git a/src/Type/ResolvedDataTableTypeFactory.php b/src/Type/ResolvedDataTableTypeFactory.php index c11b582d..aa023bb8 100755 --- a/src/Type/ResolvedDataTableTypeFactory.php +++ b/src/Type/ResolvedDataTableTypeFactory.php @@ -6,7 +6,7 @@ class ResolvedDataTableTypeFactory implements ResolvedDataTableTypeFactoryInterface { - public function createResolvedType(DataTableTypeInterface $type, array $typeExtensions, ResolvedDataTableTypeInterface $parent = null): ResolvedDataTableTypeInterface + public function createResolvedType(DataTableTypeInterface $type, array $typeExtensions, ?ResolvedDataTableTypeInterface $parent = null): ResolvedDataTableTypeInterface { return new ResolvedDataTableType($type, $typeExtensions, $parent); } diff --git a/src/Type/ResolvedDataTableTypeFactoryInterface.php b/src/Type/ResolvedDataTableTypeFactoryInterface.php index a37fa8ff..529fde7e 100755 --- a/src/Type/ResolvedDataTableTypeFactoryInterface.php +++ b/src/Type/ResolvedDataTableTypeFactoryInterface.php @@ -11,5 +11,5 @@ interface ResolvedDataTableTypeFactoryInterface /** * @param array $typeExtensions */ - public function createResolvedType(DataTableTypeInterface $type, array $typeExtensions, ResolvedDataTableTypeInterface $parent = null): ResolvedDataTableTypeInterface; + public function createResolvedType(DataTableTypeInterface $type, array $typeExtensions, ?ResolvedDataTableTypeInterface $parent = null): ResolvedDataTableTypeInterface; } diff --git a/src/Type/ResolvedDataTableTypeInterface.php b/src/Type/ResolvedDataTableTypeInterface.php index e8b245da..720cb8d8 100755 --- a/src/Type/ResolvedDataTableTypeInterface.php +++ b/src/Type/ResolvedDataTableTypeInterface.php @@ -28,7 +28,7 @@ public function getTypeExtensions(): array; /** * @param array $options */ - public function createBuilder(DataTableFactoryInterface $factory, string $name, ProxyQueryInterface $query = null, array $options = []): DataTableBuilderInterface; + public function createBuilder(DataTableFactoryInterface $factory, string $name, ?ProxyQueryInterface $query = null, array $options = []): DataTableBuilderInterface; public function createView(DataTableInterface $dataTable): DataTableView; diff --git a/tests/Unit/Bridge/Doctrine/Orm/Filter/ExpressionTransformer/CallbackExpressionTransformerTest.php b/tests/Unit/Bridge/Doctrine/Orm/Filter/ExpressionTransformer/CallbackExpressionTransformerTest.php index b02103c4..8a7162dd 100644 --- a/tests/Unit/Bridge/Doctrine/Orm/Filter/ExpressionTransformer/CallbackExpressionTransformerTest.php +++ b/tests/Unit/Bridge/Doctrine/Orm/Filter/ExpressionTransformer/CallbackExpressionTransformerTest.php @@ -11,7 +11,7 @@ class CallbackExpressionTransformerTest extends ExpressionTransformerTestCase { - public static function createTransformer(callable $callback = null): ExpressionTransformerInterface + public static function createTransformer(?callable $callback = null): ExpressionTransformerInterface { return new CallbackExpressionTransformer($callback); }