Added nullsafe operator to simplify conditions

This commit is contained in:
Alejandro Celaya
2021-05-23 12:31:10 +02:00
parent e0f0bb5523
commit c01121d61a
64 changed files with 95 additions and 113 deletions

View File

@@ -91,7 +91,7 @@ class CrossDomainMiddlewareTest extends TestCase
*/
public function optionsRequestParsesRouteMatchToDetermineAllowedMethods(
?string $allowHeader,
string $expectedAllowedMethods
string $expectedAllowedMethods,
): void {
$originalResponse = new Response();
if ($allowHeader !== null) {
@@ -121,7 +121,7 @@ class CrossDomainMiddlewareTest extends TestCase
public function expectedStatusCodeIsReturnDependingOnRequestMethod(
string $method,
int $status,
int $expectedStatus
int $expectedStatus,
): void {
$originalResponse = (new Response())->withStatus($status);
$request = (new ServerRequest())->withMethod($method)