forked from mirror/Part-DB.Part-DB-server
Improved typing and phpdoc type annotations
This commit is contained in:
parent
3817ba774d
commit
b7c8ca2a48
39 changed files with 189 additions and 129 deletions
|
@ -48,7 +48,7 @@ class ErrorDataTable implements DataTableTypeInterface
|
|||
});
|
||||
}
|
||||
|
||||
public function configure(DataTable $dataTable, array $options)
|
||||
public function configure(DataTable $dataTable, array $options): void
|
||||
{
|
||||
$optionsResolver = new OptionsResolver();
|
||||
$this->configureOptions($optionsResolver);
|
||||
|
@ -74,7 +74,10 @@ class ErrorDataTable implements DataTableTypeInterface
|
|||
$dataTable->createAdapter(ArrayAdapter::class, $data);
|
||||
}
|
||||
|
||||
public static function errorTable(DataTableFactory $dataTableFactory, Request $request, $errors): Response
|
||||
/**
|
||||
* @param string[]|string $errors
|
||||
*/
|
||||
public static function errorTable(DataTableFactory $dataTableFactory, Request $request, array|string $errors): Response
|
||||
{
|
||||
$error_table = $dataTableFactory->createFromType(self::class, ['errors' => $errors]);
|
||||
$error_table->handleRequest($request);
|
||||
|
|
|
@ -49,7 +49,7 @@ class NumberConstraint extends AbstractConstraint
|
|||
$this->value2 = $value2;
|
||||
}
|
||||
|
||||
public function getOperator(): string
|
||||
public function getOperator(): string|null
|
||||
{
|
||||
return $this->operator;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ class ProjectBomEntriesDataTable implements DataTableTypeInterface
|
|||
}
|
||||
|
||||
|
||||
public function configure(DataTable $dataTable, array $options)
|
||||
public function configure(DataTable $dataTable, array $options): void
|
||||
{
|
||||
$dataTable
|
||||
//->add('select', SelectColumn::class)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue