Skip to content

Commit b1000a4

Browse files
committed
fix issues reported by PHPStan
1 parent f367563 commit b1000a4

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ parameters:
1818
count: 1
1919
path: src/Qossmic/DataTransformer/ValueObjectTransformer.php
2020

21-
-
22-
message: '#^Cannot access offset ''strategy'' on mixed\.$#'
23-
identifier: offsetAccess.nonOffsetAccessible
24-
count: 1
25-
path: src/Qossmic/DependencyInjection/Compiler/RegisterExceptionHandlersPass.php
26-
2721
-
2822
message: '#^Parameter \#1 \$strategy of method Qossmic\\RichModelForms\\ExceptionHandling\\ExceptionHandlerRegistry\:\:has\(\) expects string, mixed given\.$#'
2923
identifier: argument.type

src/Qossmic/DataMapper/DataMapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function mapFormsToData(\Traversable $forms, mixed &$data): void
129129
$writePropertyPath($data, $form->getData());
130130
} elseif ($propertyMapper instanceof PropertyMapperInterface) {
131131
$propertyMapper->writePropertyValue($data, $form->getData());
132-
} else {
132+
} elseif (is_string($writePropertyPath)) {
133133
$writePropertyPaths[$writePropertyPath][] = $form;
134134
}
135135
} catch (\Throwable $e) {

src/Qossmic/DependencyInjection/Compiler/RegisterExceptionHandlersPass.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function process(ContainerBuilder $container): void
4444
$exceptionHandlers[$id] = new TypedReference($id, $class);
4545

4646
foreach ($tag as $attributes) {
47+
/** @phpstan-ignore-next-line */
4748
$strategies[$attributes['strategy']] = $id;
4849
}
4950
}

0 commit comments

Comments
 (0)