Skip to content

Commit 0860151

Browse files
committed
chore: phpstan fixes
1 parent 4c50f5a commit 0860151

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/Laravel/Controller/ApiPlatformController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ public function __invoke(Request $request): Response
6969
}
7070

7171
if (null === $operation->canRead()) {
72-
$operation = $operation->withRead($operation->getUriVariables() || $request->isMethodSafe()); // @phpstan-ignore-line
72+
$operation = $operation->withRead($operation->getUriVariables() || $request->isMethodSafe());
7373
}
7474

7575
if (null === $operation->canDeserialize()) {
76-
$operation = $operation->withDeserialize(\in_array($operation->getMethod(), ['POST', 'PUT', 'PATCH'], true)); // @phpstan-ignore-line
76+
$operation = $operation->withDeserialize(\in_array($operation->getMethod(), ['POST', 'PUT', 'PATCH'], true));
7777
}
7878

7979
$body = $this->provider->provide($operation, $uriVariables, $context);

src/Laravel/Eloquent/Metadata/Factory/Property/EloquentPropertyMetadataFactory.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ public function create(string $resourceClass, string $property, array $options =
5757
return $this->decorated?->create($resourceClass, $property, $options) ?? new ApiProperty();
5858
}
5959

60-
if (!$model instanceof Model) {
61-
return $this->decorated?->create($resourceClass, $property, $options) ?? new ApiProperty();
62-
}
63-
6460
try {
6561
$propertyMetadata = $this->decorated?->create($resourceClass, $property, $options) ?? new ApiProperty();
6662
} catch (PropertyNotFoundException) {

0 commit comments

Comments
 (0)