Skip to content

Commit

Permalink
Fix RiskyTruthyFalsyComparison issues
Browse files Browse the repository at this point in the history
Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Feb 8, 2024
1 parent b50e672 commit 89c35db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/Emitter/SapiStreamEmitterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ public function testEmitMemoryUsage(

$contentsCallback = static function (int $position, ?int $length = null) use (&$sizeBytes): string {
self::assertIsInt($sizeBytes);
if (! $length) {
if ($length === null) {
$length = $sizeBytes - $position;
}

Expand Down
2 changes: 1 addition & 1 deletion test/TestAsset/MockStreamHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function handleRewind(): bool
/** @psalm-suppress PossiblyUnusedReturnValue */
public function handleRead(int $length): string
{
if ($this->trackPeakBufferLength) {
if ($this->trackPeakBufferLength !== null) {
($this->trackPeakBufferLength)($length);
}

Expand Down

0 comments on commit 89c35db

Please sign in to comment.