Skip to content

Commit a47c019

Browse files
committed
Code style
1 parent 1a94f43 commit a47c019

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/Adapter/ArrayResultSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ArrayResultSet implements ResultSetInterface
2929
/**
3030
* @param Row[] $data
3131
*/
32-
public function __construct(array $data, int $totalRows = null, int $totalFilteredRows = null)
32+
public function __construct(array $data, ?int $totalRows = null, ?int $totalFilteredRows = null)
3333
{
3434
$this->data = $data;
3535
$this->totalRows = $totalRows ?? count($data);

src/Adapter/Doctrine/ORMAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class ORMAdapter extends AbstractAdapter
6262
/** @var QueryBuilderProcessorInterface[] */
6363
protected array $criteriaProcessors = [];
6464

65-
public function __construct(ManagerRegistry $registry = null)
65+
public function __construct(?ManagerRegistry $registry = null)
6666
{
6767
if (null === $registry) {
6868
throw new MissingDependencyException('Install doctrine/doctrine-bundle to use the ORMAdapter');

src/Column/TwigColumn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class TwigColumn extends AbstractColumn
2525
{
2626
protected readonly Environment $twig;
2727

28-
public function __construct(Environment $twig = null)
28+
public function __construct(?Environment $twig = null)
2929
{
3030
if (null === $twig) {
3131
throw new MissingDependencyException('You must have TwigBundle installed to use ' . static::class);

src/Column/TwigStringColumn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
class TwigStringColumn extends TwigColumn
2525
{
26-
public function __construct(Environment $twig = null)
26+
public function __construct(?Environment $twig = null)
2727
{
2828
parent::__construct($twig);
2929

src/DataTable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class DataTable
9292
/**
9393
* @param array<string, mixed> $options
9494
*/
95-
public function __construct(EventDispatcherInterface $eventDispatcher, DataTableExporterManager $exporterManager, array $options = [], Instantiator $instantiator = null)
95+
public function __construct(EventDispatcherInterface $eventDispatcher, DataTableExporterManager $exporterManager, array $options = [], ?Instantiator $instantiator = null)
9696
{
9797
$this->eventDispatcher = $eventDispatcher;
9898
$this->exporterManager = $exporterManager;
@@ -338,7 +338,7 @@ public function getOption(string $name): mixed
338338
/**
339339
* @param ?array<string, mixed> $options
340340
*/
341-
public function setAdapter(AdapterInterface $adapter, array $options = null): static
341+
public function setAdapter(AdapterInterface $adapter, ?array $options = null): static
342342
{
343343
if (null !== $options) {
344344
$adapter->configure($options);

src/Twig/TwigRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class TwigRenderer implements DataTableRendererInterface
2626
{
2727
private readonly Environment $twig;
2828

29-
public function __construct(Environment $twig = null)
29+
public function __construct(?Environment $twig = null)
3030
{
3131
if (null === $twig) {
3232
throw new MissingDependencyException('You must have symfony/twig-bundle installed to use the default Twig based DataTables rendering');

0 commit comments

Comments
 (0)