Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix StyleCI checks #223

Merged
merged 2 commits into from
Dec 2, 2020
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);
andrew-demb marked this conversation as resolved.
Show resolved Hide 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) {
andrew-demb marked this conversation as resolved.
Show resolved Hide resolved
$combinedType = 'empty'; // @see https://github.com/vimeo/psalm/issues/3492
}

Expand Down
Loading