apply rules rector up to php82

This commit is contained in:
2023-05-01 21:39:45 +02:00
parent 81e8928344
commit 6d63177ff4
733 changed files with 1257 additions and 1322 deletions

View File

@@ -316,7 +316,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
json_encode(['type' => 'person', 'id' => $personId], JSON_THROW_ON_ERROR)
);
$response = $this->client->getResponse();
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
@@ -338,7 +338,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
}
$response = $this->client->getResponse();
$data = json_decode($response->getContent(), null, 512, JSON_THROW_ON_ERROR);
$data = json_decode((string) $response->getContent(), null, 512, JSON_THROW_ON_ERROR);
// check that the person id is contained
$participationsPersonsIds = array_map(
@@ -358,7 +358,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
json_encode(['type' => 'person', 'id' => $personId], JSON_THROW_ON_ERROR)
);
$response = $this->client->getResponse();
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
@@ -394,7 +394,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
$this->markTestSkipped('the next tests should appears only on valid accompanying period');
}
$data = json_decode($this->client->getResponse()->getContent(), true, 512, JSON_THROW_ON_ERROR);
$data = json_decode((string) $this->client->getResponse()->getContent(), true, 512, JSON_THROW_ON_ERROR);
$this->assertArrayHasKey('id', $data);
$this->assertArrayHasKey('type', $data);
$this->assertEquals('social_issue', $data['type']);
@@ -425,7 +425,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
$this->markTestSkipped('the next tests should appears only on valid accompanying period');
}
$data = json_decode($response->getContent(), null, 512, JSON_THROW_ON_ERROR);
$data = json_decode((string) $response->getContent(), null, 512, JSON_THROW_ON_ERROR);
$this->assertEquals(
$data->id,
$periodId,
@@ -487,7 +487,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
json_encode(['type' => 'accompanying_period_comment', 'content' => 'this is a text'])
);
$response = $this->client->getResponse();
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
@@ -506,7 +506,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
json_encode(['type' => 'accompanying_period_comment', 'id' => $data['id']], JSON_THROW_ON_ERROR)
);
$response = $this->client->getResponse();
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
}
@@ -563,7 +563,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
json_encode(['type' => 'person', 'id' => $personId], JSON_THROW_ON_ERROR)
);
$response = $this->client->getResponse();
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
@@ -590,7 +590,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
json_encode(['type' => 'thirdparty', 'id' => $thirdPartyId], JSON_THROW_ON_ERROR)
);
$response = $this->client->getResponse();
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
@@ -644,7 +644,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
json_encode(['type' => 'accompanying_period_resource', 'resource' => ['type' => 'person', 'id' => $personId]])
);
$response = $this->client->getResponse();
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
@@ -688,7 +688,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
json_encode(['type' => 'accompanying_period_resource', 'resource' => ['type' => 'thirdparty', 'id' => $thirdPartyId]])
);
$response = $this->client->getResponse();
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));