Skip to content

Commit

Permalink
chore: github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreyu committed Feb 11, 2024
1 parent 6a85c3c commit c1b8120
Show file tree
Hide file tree
Showing 26 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion src/Action/Type/ResolvedActionTypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Action/Type/ResolvedActionTypeFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ interface ResolvedActionTypeFactoryInterface
/**
* @param array<ActionTypeExtensionInterface> $typeExtensions
*/
public function createResolvedType(ActionTypeInterface $type, array $typeExtensions = [], ResolvedActionTypeInterface $parent = null): ResolvedActionTypeInterface;
public function createResolvedType(ActionTypeInterface $type, array $typeExtensions = [], ?ResolvedActionTypeInterface $parent = null): ResolvedActionTypeInterface;
}
8 changes: 4 additions & 4 deletions src/Column/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand All @@ -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);

Expand All @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/Column/ColumnConfigBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/Column/ColumnConfigBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 4 additions & 4 deletions src/Column/ColumnInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 4 additions & 4 deletions src/Column/Type/ResolvedColumnType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Column/Type/ResolvedColumnTypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Column/Type/ResolvedColumnTypeFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ interface ResolvedColumnTypeFactoryInterface
/**
* @param array<ColumnTypeExtensionInterface> $typeExtensions
*/
public function createResolvedType(ColumnTypeInterface $type, array $typeExtensions = [], ResolvedColumnTypeInterface $parent = null): ResolvedColumnTypeInterface;
public function createResolvedType(ColumnTypeInterface $type, array $typeExtensions = [], ?ResolvedColumnTypeInterface $parent = null): ResolvedColumnTypeInterface;
}
8 changes: 4 additions & 4 deletions src/Column/Type/ResolvedColumnTypeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 4 additions & 4 deletions src/DataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down Expand Up @@ -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.');
Expand All @@ -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.');
Expand All @@ -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.');
Expand Down
12 changes: 6 additions & 6 deletions src/DataTableBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
12 changes: 6 additions & 6 deletions src/DataTableBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function hasColumn(string $name): bool;
/**
* @param class-string<ColumnTypeInterface>|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;

Expand All @@ -61,7 +61,7 @@ public function hasFilter(string $name): bool;
/**
* @param class-string<FilterTypeInterface>|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;

Expand All @@ -88,7 +88,7 @@ public function hasAction(string $name): bool;
/**
* @param class-string<ActionTypeInterface>|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;

Expand All @@ -107,7 +107,7 @@ public function hasBatchAction(string $name): bool;
/**
* @param class-string<ActionTypeInterface>|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;

Expand All @@ -130,7 +130,7 @@ public function hasRowAction(string $name): bool;
/**
* @param class-string<ActionTypeInterface>|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;

Expand All @@ -153,7 +153,7 @@ public function hasExporter(string $name): bool;
/**
* @param class-string<ExporterTypeInterface>|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;

Expand Down
8 changes: 4 additions & 4 deletions src/DataTableInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Exporter/Type/ResolvedExporterTypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exporter/Type/ResolvedExporterTypeFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ interface ResolvedExporterTypeFactoryInterface
/**
* @param array<ExporterTypeExtensionInterface> $typeExtensions
*/
public function createResolvedType(ExporterTypeInterface $type, array $typeExtensions = [], ResolvedExporterTypeInterface $parent = null): ResolvedExporterTypeInterface;
public function createResolvedType(ExporterTypeInterface $type, array $typeExtensions = [], ?ResolvedExporterTypeInterface $parent = null): ResolvedExporterTypeInterface;
}
2 changes: 1 addition & 1 deletion src/Filter/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion src/Filter/Type/ResolvedFilterTypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Filter/Type/ResolvedFilterTypeFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ interface ResolvedFilterTypeFactoryInterface
/**
* @param array<FilterTypeExtensionInterface> $typeExtensions
*/
public function createResolvedType(FilterTypeInterface $type, array $typeExtensions = [], ResolvedFilterTypeInterface $parent = null): ResolvedFilterTypeInterface;
public function createResolvedType(FilterTypeInterface $type, array $typeExtensions = [], ?ResolvedFilterTypeInterface $parent = null): ResolvedFilterTypeInterface;
}
Loading

0 comments on commit c1b8120

Please sign in to comment.