Skip to content

Commit 68c31f8

Browse files
committed
Fix CS
1 parent 6f43599 commit 68c31f8

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

phpstan.neon.dist

+1-8
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,4 @@ parameters:
2020
- '#Ternary operator condition is always true\.#'
2121
- '#Negated boolean expression is always false\.#'
2222
- '#^PHPDoc tag @param has invalid value#'
23-
- '#^PHPDoc tag @return with type AsyncAws\\[^\\]+\\Enum\\[^ ]+ is incompatible with native type string(\|null)?\.$#'
24-
- '#^Method AsyncAws\\[^ ]+ should return string\|null but returns AsyncAws\\[^\\]+\\Enum\\[^\.]+\.$#'
25-
- '#^Property AsyncAws\\[^ ]+ \(AsyncAws\\[^\\]+\\Enum\\[^\)]+\) does not accept string\|null\.$#'
26-
- '#^Parameter \#3 ...\$args of function sprintf expects bool\|float\|int\|string\|null, AsyncAws\\[^\\]+\\Enum\\[^ ]+ given\.$#'
27-
- '#^Parameter \#1 \$value of static method AsyncAws\\[^\\]+\\Enum\\[^:]+::exists\(\) expects string, AsyncAws\\[^\\]+\\Enum\\[^ ]+ given\.$#'
28-
- '#^PHPDoc tag @(var|return) has invalid value \(list<[^:]+::\*>\): Unexpected token "::", expected .>. at offset \d+.$#'
29-
- '#^Parameter \#3 \$query of class AsyncAws\\Core\\Request constructor expects array<string>, array<string, AsyncAws\\[^\\]+\\Enum\\[^ ]+ given\.$#'
30-
- '#^Parameter \#4 \$headers of class AsyncAws\\Core\\Request constructor expects array<string>, array<string, AsyncAws\\[^\\]+\\Enum\\[^ ]+ given\.$#'
23+
- '#^Parameter \#1 \$input of class AsyncAws\\[^\\]+\\ValueObject\\[^ ]+ constructor expects array\([^\)]+\), array\([^\)]+\) given\.#'

src/CodeGenerator/src/Generator/PhpGenerator/ClassFactory.php

+1
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ public function fromPropertyReflection(\ReflectionProperty $from): Property
177177
? ClassType::VISIBILITY_PRIVATE
178178
: ($from->isProtected() ? ClassType::VISIBILITY_PROTECTED : ClassType::VISIBILITY_PUBLIC)
179179
);
180+
/** @phpstan-ignore-next-line */
180181
if (\PHP_VERSION_ID >= 70400 && ($type = $from->getType()) instanceof \ReflectionNamedType) {
181182
$prop->setType($type->getName());
182183
$prop->setNullable($type->allowsNull());

0 commit comments

Comments
 (0)