Skip to content

Commit 38fe2e1

Browse files
committed
Add PHP 8.4 compatibility
1 parent 71ffb40 commit 38fe2e1

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

Model/Config/XmlToArray.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static function getChildrenByName(\DOMElement $parent, string $name): arr
4343
* @param string $name
4444
* @return string[]
4545
*/
46-
public static function getAttributeConfig(\DOMElement $element, string $name, string $withIndexKey = null): array
46+
public static function getAttributeConfig(\DOMElement $element, string $name, ?string $withIndexKey = null): array
4747
{
4848
$idx = $withIndexKey ?? $name;
4949
$value = $element->getAttribute($name);

Test/Integration/Model/GridExport/Type/ExportTypesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private function getExportFilePath(AbstractExportType $export): string
9292
return $fileSystem->getDirectoryRead($export->getExportDir())->getAbsolutePath($export->getFileName());
9393
}
9494

95-
private function createStubGrid(array $gridData, array $columns = null): HyvaGridViewModel
95+
private function createStubGrid(array $gridData, ?array $columns = null): HyvaGridViewModel
9696
{
9797
$columns = $columns ?? $this->createColumnsFromGrid($gridData);
9898
$stubGrid = $this->createMock(HyvaGridViewModel::class);

Test/Integration/ViewModel/HyvaGrid/CellTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ private function createColumnDefinition(?string $type = null, array $args = []):
2525
return ObjectManager::getInstance()->create(ColumnDefinitionInterface::class, $arguments);
2626
}
2727

28-
private function createCellWithValue($value, string $type = null): Cell
28+
private function createCellWithValue($value, ?string $type = null): Cell
2929
{
3030
$arguments = ['value' => $value, 'columnDefinition' => $this->createColumnDefinition($type)];
3131
return ObjectManager::getInstance()->create(CellInterface::class, $arguments);

Test/Integration/ViewModel/HyvaGrid/NavigationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private function createArrayGridSource(array $gridData): HyvaGridSourceInterface
4040
private function createNavigation(
4141
array $gridData,
4242
array $navigationConfig,
43-
RequestInterface $request = null
43+
?RequestInterface $request = null
4444
): Navigation {
4545
$hyvaGridSource = $this->createArrayGridSource($gridData);
4646
return ObjectManager::getInstance()->create(NavigationInterface::class, filter([

Test/Unit/Model/TypeReflection/Stub/StubMethodParameterReflection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function nullableType(?string $arg)
2929

3030
}
3131

32-
public function optionalType(string $arg = null)
32+
public function optionalType(?string $arg = null)
3333
{
3434

3535
}

ViewModel/HyvaGrid/Cell.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(
5151
DataTypeToStringConverterLocatorInterface $dataTypeToStringConverter,
5252
LayoutInterface $layout,
5353
Escaper $escaper,
54-
RowInterface $row = null
54+
?RowInterface $row = null
5555
) {
5656
$this->value = $value;
5757
$this->columnDefinition = $columnDefinition;

ViewModel/HyvaGrid/GridFilter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,15 @@ private function buildFilterOption(array $optionConfig): FilterOptionInterface
164164
return $this->filterOptionFactory->create($arguments);
165165
}
166166

167-
public function getInputName(string $aspect = null): string
167+
public function getInputName(?string $aspect = null): string
168168
{
169169
$key = $this->getColumnDefinition()->getKey();
170170
return isset($aspect)
171171
? sprintf('%s[_filter][%s][%s]', $this->gridName, $key, $aspect)
172172
: sprintf('%s[_filter][%s]', $this->gridName, $key);
173173
}
174174

175-
public function getValue(string $aspect = null)
175+
public function getValue(?string $aspect = null)
176176
{
177177
$gridQueryParams = $this->request->getParam($this->gridName);
178178
$value = $gridQueryParams['_filter'][$this->getColumnDefinition()->getKey()] ?? null;

ViewModel/HyvaGrid/GridFilterInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ public function isDisabled(): bool;
1717
*/
1818
public function getOptions(): ?array;
1919

20-
public function getInputName(string $aspect = null): string;
20+
public function getInputName(?string $aspect = null): string;
2121

2222
/**
2323
* @param string|null $aspect
2424
* @return mixed
2525
*/
26-
public function getValue(string $aspect = null);
26+
public function getValue(?string $aspect = null);
2727

2828
public function getFormId(): string;
2929

0 commit comments

Comments
 (0)