Skip to content

Commit c22cfaa

Browse files
chore(deps): update dependency vimeo/psalm to v5.23.1 (#219)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: M.P. Korstanje <[email protected]>
1 parent 1e60601 commit c22cfaa

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

php/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"require-dev": {
2121
"phpunit/phpunit": "^10.5",
22-
"vimeo/psalm": "5.19.1",
22+
"vimeo/psalm": "5.23.1",
2323
"friendsofphp/php-cs-fixer": "^3.51",
2424
"psalm/plugin-phpunit": "^0.19.0"
2525
},

php/src/PickleCompiler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ private function pickleDataTable(DataTable $dataTable, array $variableCells, arr
252252
private function pickleDocString(DocString $docstring, array $variableCells, array $valueCells): PickleDocString
253253
{
254254
return new PickleDocString(
255-
mediaType: $docstring->mediaType ? $this->interpolate($docstring->mediaType, $variableCells, $valueCells) : null,
255+
mediaType: $docstring->mediaType !== null ? $this->interpolate($docstring->mediaType, $variableCells, $valueCells) : null,
256256
content: $this->interpolate($docstring->content, $variableCells, $valueCells),
257257
);
258258
}

php/src/TokenFormatter.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ public function formatToken(Token $token): string
1212
return 'EOF';
1313
}
1414

15+
$keyword = $token->match?->keyword;
1516
return sprintf(
1617
"(%s:%s)%s:%s/%s/%s",
1718
$token->getLocation()->line,
1819
$token->getLocation()->column,
1920
$token->match?->tokenType->name ?? '',
20-
$token->match?->keyword ? $this->formatKeyword($token) : '',
21+
$keyword !== null && $keyword !== '' ? $this->formatKeyword($token) : '',
2122
$token->match?->text ?? '',
2223
$token->match === null ? ''
2324
: join(',', array_map(fn ($linespan) => $linespan->column . ':' . $linespan->text, $token->match->items)),

0 commit comments

Comments
 (0)