Skip to content

Commit

Permalink
Remove useless @phpstan-ignore argument.type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Korbeil committed Jan 31, 2025
1 parent b9ec92f commit 47f575e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Generator/CreateTargetStatementsGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private function constructorArgument(GeneratorMetadata $metadata, PropertyMetada
new Arg(new Scalar\String_(sprintf('Cannot create an instance of "%s" from mapping data because its constructor requires the following parameters to be present : "$%s".', $metadata->mapperMetadata->target, $propertyMetadata->target->property))),
new Arg(create_scalar_int(0)),
new Arg(new Expr\ConstFetch(new Name('null'))),
new Arg(new Expr\Array_([ // @phpstan-ignore argument.type
new Arg(new Expr\Array_([
create_expr_array_item(new Scalar\String_($propertyMetadata->target->property)),
])),
new Arg(new Scalar\String_($metadata->mapperMetadata->target)),
Expand Down Expand Up @@ -262,7 +262,7 @@ private function constructorArgumentWithoutSource(GeneratorMetadata $metadata, \
new Arg(new Scalar\String_(sprintf('Cannot create an instance of "%s" from mapping data because its constructor requires the following parameters to be present : "$%s".', $metadata->mapperMetadata->target, $constructorParameter->getName()))),
new Arg(create_scalar_int(0)),
new Arg(new Expr\ConstFetch(new Name('null'))),
new Arg(new Expr\Array_([ // @phpstan-ignore argument.type
new Arg(new Expr\Array_([
create_expr_array_item(new Scalar\String_($constructorParameter->getName())),
])),
new Arg(new Scalar\String_($constructorParameter->getName())),
Expand Down
1 change: 0 additions & 1 deletion src/Generator/MapperGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public function generate(GeneratorMetadata $metadata): array

$statements = [];
if ($metadata->strictTypes) {
// @phpstan-ignore argument.type
$statements[] = new Stmt\Declare_([create_declare_item('strict_types', create_scalar_int(1))]);
}
$statements[] = (new Builder\Class_($metadata->mapperMetadata->className))
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/PropertyConditionsGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private function groupsCheck(VariableRegistry $variableRegistry, ?array $groups
new Expr\Array_()
)
),
new Arg(new Expr\Array_(array_map(function (string $group) { // @phpstan-ignore argument.type
new Arg(new Expr\Array_(array_map(function (string $group) {
return create_expr_array_item(new Scalar\String_($group));
}, $groups))),
])
Expand Down
2 changes: 1 addition & 1 deletion src/Transformer/BuiltinTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function getCheckExpression(Expr $input, Expr $target, PropertyMetadata $

private function toArray(Expr $input): Expr
{
return new Expr\Array_([create_expr_array_item($input)]); // @phpstan-ignore argument.type
return new Expr\Array_([create_expr_array_item($input)]);
}

private function fromIteratorToArray(Expr $input): Expr
Expand Down

0 comments on commit 47f575e

Please sign in to comment.