Skip to content

Commit 56d8df4

Browse files
committed
psalm
1 parent 2e37a9e commit 56d8df4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/Symfony/Component/ObjectMapper/ObjectMapper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ private function getSourceValue(object $source, object $target, mixed $value, \S
243243
&& ($mapTo = $this->getMapTarget($innerMetadata, $value, $source, $target))
244244
&& (\is_string($mapTo->target) && class_exists($mapTo->target))
245245
) {
246-
if (PHP_VERSION_ID >= 80400 && $this->lazy) {
246+
if (\PHP_VERSION_ID >= 80400 && $this->lazy) {
247247
$refl = new \ReflectionClass($mapTo->target);
248248
$mapper = $this->objectMapper ?? $this;
249249

@@ -334,9 +334,9 @@ private function applyTransforms(Mapping $map, mixed $value, object $source, ?ob
334334
}
335335

336336
/**
337-
* @param (string|callable(mixed $value, object $object): mixed) $fn
337+
* @param string|callable(mixed $value, object $object): mixed) $fn
338338
*/
339-
private function getCallable(string|callable $fn, ?ContainerInterface $locator = null): ?callable
339+
private function getCallable(string|callable $fn, ?ContainerInterface $locator = null): ObjectMapperAwareInterface|null|callable
340340
{
341341
if (\is_callable($fn)) {
342342
if ($fn instanceof ObjectMapperAwareInterface) {

src/Symfony/Component/ObjectMapper/Transform/MapLazily.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
/**
1919
* @author Antoine Bluchet <soyuka@gmail.com>
20+
*
21+
* @implements TransformCallableInterface<object, object>
2022
*/
2123
#[\Attribute(\Attribute::TARGET_PROPERTY)]
2224
class MapLazily implements TransformCallableInterface, ObjectMapperAwareInterface
@@ -26,7 +28,7 @@ class MapLazily implements TransformCallableInterface, ObjectMapperAwareInterfac
2628
public function __construct(
2729
private string $targetClass,
2830
) {
29-
if (PHP_VERSION_ID < 80400) {
31+
if (\PHP_VERSION_ID < 80400) {
3032
throw new \Exception('Lazy ghost are supported only with PHP >= 8.4.');
3133
}
3234
}

0 commit comments

Comments
 (0)