Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ enabled:

disabled:
- phpdoc_annotation_without_dot # This is still buggy: https://github.com/symfony/symfony/pull/19198
- short_array_syntax # Support PHP 5
- no_superfluous_phpdoc_tags_symfony # All params/return tags should be preserved
6 changes: 3 additions & 3 deletions bin/src/MixinGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private function interface(ReflectionClass $assert): string
*/
private function nullOr(ReflectionMethod $method, int $indent): ?string
{
return $this->assertion($method, 'nullOr%s', 'null|%s', $indent);
Comment thread
andrew-demb marked this conversation as resolved.
return $this->assertion($method, 'nullOr%s', '%s|null', $indent);
}

/**
Expand Down Expand Up @@ -157,7 +157,7 @@ private function assertion(ReflectionMethod $method, string $methodNameTemplate,
$parsedComment = $this->parseDocComment($comment);

$parameters = [];
/** @psalm-var array<string, null|scalar> $parametersDefaults */
/** @psalm-var array<string, scalar|null> $parametersDefaults */
$parametersDefaults = [];
$parametersReflection = $method->getParameters();

Expand Down Expand Up @@ -262,7 +262,7 @@ private function applyTypeTemplate(string $type, string $typeTemplate): string
{
$combinedType = sprintf($typeTemplate, $type);

if ('null|empty' === $combinedType) {
if ('empty|null' === $combinedType) {
Comment thread
andrew-demb marked this conversation as resolved.
$combinedType = 'empty'; // @see https://github.com/vimeo/psalm/issues/3492
}

Expand Down
Loading