<?php
use PHPUnit\Framework\TestCase;
final class DemoTest extends TestCase
{
public function testSomething()
{
self::assertJsonResponse(contentType: 'text/html');
}
protected static function assertJsonResponse(int $statusCode = 200, string $contentType = 'application/json'): void
{
// logic
}
}
The code is valid and needs no change.
Bug Report
Minimal PHP Code Causing Issue
See https://getrector.com/demo/090acb81-a17d-496e-b74d-e02e4b3512cd
Responsible rules
ScalarArgumentToExpectedParamTypeRectorExpected Behavior
The code is valid and needs no change.