Skip to content

Commit 580f3a6

Browse files
authored
[PHPStan] Resolved phpstan issues (#79)
1 parent 1fa57ee commit 580f3a6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/bundle/Command/MigrateLegacyMatrixCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
9898
}
9999

100100
if ($isValidXml) {
101-
$columnList = $xml->xpath('//column-name');
101+
$columnList = $xml->xpath('//column-name') ?: [];
102102

103103
$columns = [];
104104

@@ -178,7 +178,8 @@ public function execute(InputInterface $input, OutputInterface $output): int
178178
],
179179
]);
180180

181-
$rows = $this->convertCellsToRows($xml->xpath('c'), $columns);
181+
$cells = $xml->xpath('c') ?: [];
182+
$rows = $this->convertCellsToRows($cells, $columns);
182183

183184
$fieldValue->data['entries'] = $rows;
184185

src/lib/FieldType/Mapper/MatrixFormMapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function mapFieldDefinitionForm(FormInterface $fieldDefinitionForm, Field
6161
*/
6262
public function mapFieldValueForm(FormInterface $fieldForm, FieldData $data): void
6363
{
64-
$fieldDefinition = $data->fieldDefinition;
64+
$fieldDefinition = $data->getFieldDefinition();
6565
$fieldSettings = $fieldDefinition->getFieldSettings();
6666
$formConfig = $fieldForm->getConfig();
6767

0 commit comments

Comments
 (0)