Skip to content

Commit 8862869

Browse files
committed
fixed static analysis
1 parent 296b48a commit 8862869

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Formatter/Specialised/JoltHttpOGMTranslator.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ private function translateBinary(): Closure
316316
private const ZONE_REGEX = '(?<zone>.+)';
317317

318318
/**
319-
* @return OGMTypes
319+
* @return Date|LocalDateTime|LocalTime|DateTime|Duration|Time
320320
*
321321
* @psalm-suppress ImpureMethodCall
322322
* @psalm-suppress PossiblyFalseReference
@@ -364,7 +364,7 @@ private function translateDateTime(string $datetime)
364364
}
365365

366366
if (str_starts_with($datetime, 'P')) {
367-
return $this->durationFromFormat($datetime, $matches);
367+
return $this->durationFromFormat($datetime);
368368
}
369369

370370
throw new UnexpectedValueException(sprintf('Could not handle date/time "%s"', $datetime));
@@ -429,6 +429,9 @@ private function addNanoSecondsToSeconds(int $nanoseconds, int $seconds): array
429429
return [$seconds, $nanoseconds];
430430
}
431431

432+
/**
433+
* @psalm-suppress ImpureMethodCall
434+
*/
432435
private function durationFromFormat(string $datetime): Duration
433436
{
434437
$nanoseconds = 0;

src/Http/HttpHelper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ public static function getJsonBody(string $contents): stdClass
9898
*
9999
* @psalm-suppress MixedAssignment
100100
* @psalm-suppress MixedArrayAssignment
101+
* @psalm-suppress MixedPropertyFetch
102+
* @psalm-suppress MixedArgument
101103
*/
102104
public static function getJoltBody(string $contents): stdClass
103105
{

0 commit comments

Comments
 (0)