apply rector rules: php up to php82

This commit is contained in:
2023-07-19 23:16:01 +02:00
parent 7b637d1287
commit 023a29cb78
744 changed files with 1369 additions and 1381 deletions

View File

@@ -19,7 +19,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
*/
final class PermissionsGroupControllerTest extends WebTestCase
{
public function testEmpty()
public function testEmpty(): never
{
$this->markTestSkipped();
}

View File

@@ -161,7 +161,7 @@ final class CronManagerTest extends TestCase
class JobCanRun implements CronJobInterface
{
public function __construct(private string $key)
public function __construct(private readonly string $key)
{
}

View File

@@ -28,7 +28,7 @@ final class PickCenterTypeTest extends TypeTestCase
* Test that a user which can reach multiple center
* make CenterType render as "entity" type.
*/
public function testUserCanReachMultipleCenters()
public function testUserCanReachMultipleCenters(): never
{
$this->markTestSkipped();
//prepare user
@@ -51,7 +51,7 @@ final class PickCenterTypeTest extends TypeTestCase
* Test that a user which can reach only one center
* render as an hidden field.
*/
public function testUserCanReachMultipleSameCenter()
public function testUserCanReachMultipleSameCenter(): never
{
$this->markTestSkipped();
//prepare user
@@ -73,7 +73,7 @@ final class PickCenterTypeTest extends TypeTestCase
* Test that a user which can reach only one center
* render as an hidden field.
*/
public function testUserCanReachSingleCenter()
public function testUserCanReachSingleCenter(): never
{
$this->markTestSkipped();
//prepare user

View File

@@ -38,7 +38,7 @@ final class AbstractSearchTest extends \PHPUnit\Framework\TestCase
$this->assertEquals('01', $date->format('d'));
}
public function testRecompose()
public function testRecompose(): never
{
$this->markTestSkipped();
}

View File

@@ -64,7 +64,7 @@ final class GeographicalUnitBaseImporterTest extends KernelTestCase
$this->assertEquals($results['unitrefid'], 'layer_one');
$this->assertEquals($results['unitname'], 'Layer one');
$this->assertEquals(json_decode($results['layername'], true, 512, JSON_THROW_ON_ERROR), ['fr' => 'Test Layer']);
$this->assertEquals(json_decode((string) $results['layername'], true, 512, JSON_THROW_ON_ERROR), ['fr' => 'Test Layer']);
$this->assertEquals($results['layerrefid'], 'test');
$this->assertEquals($results['geom'], 'MULTIPOLYGON(((30 20,45 40,10 40,30 20)),((15 5,40 10,10 20,5 10,15 5)))');
@@ -93,7 +93,7 @@ final class GeographicalUnitBaseImporterTest extends KernelTestCase
$this->assertEquals($results['unitrefid'], 'layer_one');
$this->assertEquals($results['unitname'], 'Layer one fixed');
$this->assertEquals(json_decode($results['layername'], true, 512, JSON_THROW_ON_ERROR), ['fr' => 'Test Layer fixed']);
$this->assertEquals(json_decode((string) $results['layername'], true, 512, JSON_THROW_ON_ERROR), ['fr' => 'Test Layer fixed']);
$this->assertEquals($results['layerrefid'], 'test');
$this->assertEquals($results['geom'], 'MULTIPOLYGON(((130 120,45 40,10 40,130 120)),((0 0,15 5,40 10,10 20,0 0)))');
}