Skip to content

Commit

Permalink
Fix new Psalm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Sep 1, 2023
1 parent 2406ec6 commit e108a43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,11 @@
<directory name="src"/>
</errorLevel>
</MissingClosureReturnType>

<UnsupportedPropertyReferenceUsage>
<errorLevel type="suppress">
<directory name="src"/>
</errorLevel>
</UnsupportedPropertyReferenceUsage>
</issueHandlers>
</psalm>
4 changes: 3 additions & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ function splitLines(ReadableStream $source): \Traversable
}

/**
* @param int<1, 2147483647> $depth
*
* @return \Traversable<int, mixed> Traversable of decoded JSON values
*
* @throws \JsonException If JSON parsing fails
Expand All @@ -165,7 +167,7 @@ function parseLineDelimitedJson(
ReadableStream $source,
bool $associative = false,
int $depth = 512,
int $flags = 0
int $flags = 0,
): \Traversable {
foreach (splitLines($source) as $line) {
$line = \trim($line);
Expand Down

0 comments on commit e108a43

Please sign in to comment.