Rector changes and immplementations of required methods

This commit is contained in:
2025-05-22 17:47:07 +02:00
parent 053b92b77c
commit 17db59d221
1138 changed files with 2656 additions and 2616 deletions

View File

@@ -172,7 +172,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase
*
* @return void
*/
public function testAliasDidNotDisappears(QueryBuilder $qb, array $data)
public function testAliasDidNotDisappears(QueryBuilder $qb, array $data): void
{
$aliases = $qb->getAllAliases();
@@ -208,7 +208,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase
*
* @param type $data
*/
public function testAlterQuery(QueryBuilder $query, $data)
public function testAlterQuery(QueryBuilder $query, $data): void
{
// retains informations about query
$nbOfFrom = null !== $query->getDQLPart('from') ?
@@ -242,7 +242,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase
/**
* Test the `applyOn` method.
*/
public function testApplyOn()
public function testApplyOn(): void
{
$filter = $this->getAggregator();
@@ -261,7 +261,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase
*
* @dataProvider dataProviderGetQueryKeys
*/
public function testGetQueryKeys(array $data)
public function testGetQueryKeys(array $data): void
{
$queryKeys = $this->getAggregator()->getQueryKeys($data);
@@ -293,7 +293,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase
*
* @dataProvider dataProviderGetResultsAndLabels
*/
public function testGetResultsAndLabels(QueryBuilder $qb, array $data)
public function testGetResultsAndLabels(QueryBuilder $qb, array $data): void
{
// it is more convenient to group the `getResult` and `getLabels` test
// due to the fact that testing both methods use the same tools.
@@ -349,7 +349,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase
/**
* test the `getTitle` method.
*/
public function testGetTitle()
public function testGetTitle(): void
{
$title = $this->getAggregator()->getTitle();

View File

@@ -142,7 +142,7 @@ abstract class AbstractExportTest extends WebTestCase
/**
* Test the formatters type are string.
*/
public function testGetAllowedFormattersType()
public function testGetAllowedFormattersType(): void
{
foreach ($this->getExports() as $export) {
$formattersTypes = $export->getAllowedFormattersTypes();
@@ -159,7 +159,7 @@ abstract class AbstractExportTest extends WebTestCase
/**
* Test that the description is not empty.
*/
public function testGetDescription()
public function testGetDescription(): void
{
foreach ($this->getExports() as $export) {
$this->assertIsString(
@@ -179,7 +179,7 @@ abstract class AbstractExportTest extends WebTestCase
*
* @dataProvider dataProviderGetQueryKeys
*/
public function testGetQueryKeys(array $data)
public function testGetQueryKeys(array $data): void
{
foreach ($this->getExports() as $export) {
$queryKeys = $export->getQueryKeys($data);
@@ -212,7 +212,7 @@ abstract class AbstractExportTest extends WebTestCase
*
* @dataProvider dataProviderInitiateQuery
*/
public function testGetResultsAndLabels($modifiers, $acl, array $data)
public function testGetResultsAndLabels($modifiers, $acl, array $data): void
{
foreach ($this->getExports() as $export) {
// it is more convenient to group the `getResult` and `getLabels` test
@@ -284,7 +284,7 @@ abstract class AbstractExportTest extends WebTestCase
/**
* Test that the getType method return a string.
*/
public function testGetType()
public function testGetType(): void
{
foreach ($this->getExports() as $export) {
$this->assertIsString(
@@ -306,7 +306,7 @@ abstract class AbstractExportTest extends WebTestCase
*
* @dataProvider dataProviderInitiateQuery
*/
public function testInitiateQuery(mixed $modifiers, mixed $acl, mixed $data)
public function testInitiateQuery(mixed $modifiers, mixed $acl, mixed $data): void
{
foreach ($this->getExports() as $export) {
$query = $export->initiateQuery($modifiers, $acl, $data);
@@ -344,7 +344,7 @@ abstract class AbstractExportTest extends WebTestCase
/**
* Test required role is an instance of Role.
*/
public function testRequiredRole()
public function testRequiredRole(): void
{
foreach ($this->getExports() as $export) {
$role = $export->requiredRole();
@@ -361,7 +361,7 @@ abstract class AbstractExportTest extends WebTestCase
*
* @dataProvider dataProviderInitiateQuery
*/
public function testSupportsModifier(mixed $modifiers, mixed $acl, mixed $data)
public function testSupportsModifier(mixed $modifiers, mixed $acl, mixed $data): void
{
foreach ($this->getExports() as $export) {
$query = $export->initiateQuery($modifiers, $acl, $data);

View File

@@ -156,7 +156,7 @@ abstract class AbstractFilterTest extends KernelTestCase
*
* @group dbIntensive
*/
public function testAlterQuery(QueryBuilder $query, array $data)
public function testAlterQuery(QueryBuilder $query, array $data): void
{
// retains informations about query
$nbOfFrom = null !== $query->getDQLPart('from') ?
@@ -199,7 +199,7 @@ abstract class AbstractFilterTest extends KernelTestCase
self::assertIsArray($actual);
}
public function testApplyOn()
public function testApplyOn(): void
{
$filter = $this->getFilter();
@@ -211,7 +211,7 @@ abstract class AbstractFilterTest extends KernelTestCase
*
* @param array $data
*/
public function testDescriptionAction($data)
public function testDescriptionAction($data): void
{
$description = $this->getFilter()->describeAction($data);
@@ -263,7 +263,7 @@ abstract class AbstractFilterTest extends KernelTestCase
}
}
public function testGetTitle()
public function testGetTitle(): void
{
$title = $this->getFilter()->getTitle();

View File

@@ -50,7 +50,7 @@ trait PrepareUserTrait
*
* @throws \LogicException if the trait is not set up
*/
protected static function prepareUser(array $permissions)
protected static function prepareUser(array $permissions): \Chill\MainBundle\Entity\User
{
$user = new User();