mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-06 19:25:28 +02:00
Improved typing and phpdoc type annotations
This commit is contained in:
parent
3817ba774d
commit
b7c8ca2a48
39 changed files with 189 additions and 129 deletions
src/DataTables
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue