apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class BySocialActionAggregatorTest extends AbstractAggregatorTest

View File

@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class BySocialIssueAggregatorTest extends AbstractAggregatorTest

View File

@@ -12,7 +12,6 @@ declare(strict_types=1);
namespace Chill\ActivityBundle\Tests\Export\Aggregator;
use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Entity\ActivityType;
use Chill\ActivityBundle\Export\Aggregator\ActivityTypeAggregator;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
use Doctrine\ORM\EntityManagerInterface;
@@ -22,6 +21,7 @@ use Prophecy\PhpUnit\ProphecyTrait;
* Add tests for ActivityTypeAggregator.
*
* @internal
*
* @coversNothing
*/
final class ActivityTypeAggregatorTest extends AbstractAggregatorTest

View File

@@ -21,6 +21,7 @@ use Prophecy\PhpUnit\ProphecyTrait;
* Add tests for ActivityUsernAggregator.
*
* @internal
*
* @coversNothing
*/
final class ActivityUserAggregatorTest extends AbstractAggregatorTest

View File

@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class ByThirdpartyAggregatorTest extends AbstractAggregatorTest

View File

@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class ByUserAggregatorTest extends AbstractAggregatorTest

View File

@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class CreatorScopeAggregatorTest extends AbstractAggregatorTest

View File

@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class DateAggregatorTest extends AbstractAggregatorTest

View File

@@ -12,18 +12,19 @@ declare(strict_types=1);
namespace Chill\ActivityBundle\Tests\Export\Aggregator;
use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Export\Aggregator\CreatorScopeAggregator;
use Chill\ActivityBundle\Export\Aggregator\JobScopeAggregator;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class JobScopeAggregatorTest extends AbstractAggregatorTest
{
private JobScopeAggregator $aggregator;
protected function setUp(): void
{
self::bootKernel();

View File

@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class LocationTypeAggregatorTest extends AbstractAggregatorTest

View File

@@ -19,6 +19,7 @@ use Prophecy\PhpUnit\ProphecyTrait;
/**
* @internal
*
* @coversNothing
*/
final class ActivityReasonAggregatorTest extends AbstractAggregatorTest

View File

@@ -16,6 +16,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
/**
* @internal
*
* @coversNothing
*/
final class AvgActivityDurationTest extends AbstractExportTest

View File

@@ -16,6 +16,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
/**
* @internal
*
* @coversNothing
*/
final class AvgActivityVisitDurationTest extends AbstractExportTest

View File

@@ -16,6 +16,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
/**
* @internal
*
* @coversNothing
*/
final class CountActivityTest extends AbstractExportTest

View File

@@ -16,6 +16,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
/**
* @internal
*
* @coversNothing
*/
final class SumActivityDurationTest extends AbstractExportTest

View File

@@ -16,6 +16,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
/**
* @internal
*
* @coversNothing
*/
final class SumActivityVisitDurationTest extends AbstractExportTest

View File

@@ -16,6 +16,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
/**
* @internal
*
* @coversNothing
*/
final class CountActivityTest extends AbstractExportTest

View File

@@ -17,6 +17,7 @@ use Prophecy\PhpUnit\ProphecyTrait;
/**
* @internal
*
* @coversNothing
*/
final class ListActivityTest extends AbstractExportTest

View File

@@ -18,6 +18,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
* Test the "sum" part of StatActivityDuration.
*
* @internal
*
* @coversNothing
*/
final class StatActivityDurationTest extends AbstractExportTest

View File

@@ -13,7 +13,6 @@ namespace Chill\ActivityBundle\Tests\Export\Filter\ACPFilters;
use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Entity\ActivityType;
use Chill\ActivityBundle\Export\Filter\ActivityTypeFilter;
use Chill\MainBundle\Test\Export\AbstractFilterTest;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Doctrine\Common\Collections\ArrayCollection;
@@ -22,6 +21,7 @@ use Doctrine\ORM\Query\Expr;
/**
* @internal
*
* @coversNothing
*/
final class ActivityTypeFilterTest extends AbstractFilterTest

View File

@@ -19,6 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class ByCreatorFilterTest extends AbstractFilterTest

View File

@@ -19,6 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class BySocialActionFilterTest extends AbstractFilterTest

View File

@@ -20,6 +20,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class BySocialIssueFilterTest extends AbstractFilterTest

View File

@@ -15,11 +15,11 @@ use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Export\Filter\ActivityDateFilter;
use Chill\MainBundle\Service\RollingDate\RollingDate;
use Chill\MainBundle\Test\Export\AbstractFilterTest;
use DateTime;
use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class ActivityDateFilterTest extends AbstractFilterTest
@@ -54,10 +54,9 @@ final class ActivityDateFilterTest extends AbstractFilterTest
$em = self::$container->get(EntityManagerInterface::class);
yield
$em->createQueryBuilder()
->select('count(activity.id)')
->from(Activity::class, 'activity');
yield $em->createQueryBuilder()
->select('count(activity.id)')
->from(Activity::class, 'activity');
self::ensureKernelShutdown();
}

View File

@@ -20,6 +20,7 @@ use Symfony\Component\HttpFoundation\RequestStack;
/**
* @internal
*
* @coversNothing
*/
final class ActivityReasonFilterTest extends AbstractFilterTest
@@ -56,7 +57,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest
->get(EntityManagerInterface::class);
$reasons = $em->createQuery('SELECT reason '
. 'FROM ChillActivityBundle:ActivityReason reason')
.'FROM ChillActivityBundle:ActivityReason reason')
->getResult();
// generate an array of 5 different combination of results
@@ -76,11 +77,11 @@ final class ActivityReasonFilterTest extends AbstractFilterTest
yield $em->createQueryBuilder()
->select('count(activity.id)')
->from('ChillActivityBundle:Activity', 'activity');
yield $em->createQueryBuilder()
yield $em->createQueryBuilder()
->select('count(activity.id)')
->from('ChillActivityBundle:Activity', 'activity')
->join('activity.reasons', 'reasons');
yield $em->createQueryBuilder()
yield $em->createQueryBuilder()
->select('count(activity.id)')
->from('ChillActivityBundle:Activity', 'activity')
->join('activity.reasons', 'reasons')

View File

@@ -20,6 +20,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class ActivityTypeFilterTest extends AbstractFilterTest
@@ -67,10 +68,9 @@ final class ActivityTypeFilterTest extends AbstractFilterTest
$em = self::$container->get(EntityManagerInterface::class);
yield
$em->createQueryBuilder()
->select('count(activity.id)')
->from(Activity::class, 'activity');
yield $em->createQueryBuilder()
->select('count(activity.id)')
->from(Activity::class, 'activity');
self::ensureKernelShutdown();
}

View File

@@ -19,6 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class ByCreatorFilterTest extends AbstractFilterTest

View File

@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class EmergencyFilterTest extends AbstractFilterTest

View File

@@ -19,6 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class LocationTypeFilterTest extends AbstractFilterTest

View File

@@ -20,6 +20,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class ActivityReasonFilterTest extends AbstractFilterTest

View File

@@ -15,11 +15,11 @@ use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Entity\ActivityReason;
use Chill\ActivityBundle\Export\Filter\PersonFilters\PersonHavingActivityBetweenDateFilter;
use Chill\MainBundle\Test\Export\AbstractFilterTest;
use DateTime;
use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
@@ -54,8 +54,8 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
foreach ($array as $a) {
$data[] = [
'date_from' => DateTime::createFromFormat('Y-m-d', '2021-07-01'),
'date_to' => DateTime::createFromFormat('Y-m-d', '2022-07-01'),
'date_from' => \DateTime::createFromFormat('Y-m-d', '2021-07-01'),
'date_to' => \DateTime::createFromFormat('Y-m-d', '2022-07-01'),
'reasons' => [$a],
];
}
@@ -75,8 +75,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
$em->createQueryBuilder()
->select('count(activity.id)')
->from(Activity::class, 'activity')
->join('activity.person', 'person')
,
->join('activity.person', 'person'),
];
}
}

View File

@@ -14,15 +14,14 @@ namespace Chill\ActivityBundle\Tests\Export\Filter;
use Chill\ActivityBundle\Export\Filter\PersonFilters\PersonHavingActivityBetweenDateFilter;
use Chill\ActivityBundle\Repository\ActivityReasonRepository;
use Chill\MainBundle\Test\Export\AbstractFilterTest;
use DateTime;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use function array_slice;
/**
* @internal
*
* @coversNothing
*/
final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
@@ -51,8 +50,8 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
public function getFormData()
{
$date_from = DateTime::createFromFormat('Y-m-d', '2015-01-15');
$date_to = new DateTime(); // today
$date_from = \DateTime::createFromFormat('Y-m-d', '2015-01-15');
$date_to = new \DateTime(); // today
$reasons = $this->getActivityReasons();
$data = [];
@@ -61,7 +60,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
$data[] = [
'date_from' => $date_from,
'date_to' => $date_to,
'reasons' => array_slice($reasons, 0, 1 + $i),
'reasons' => \array_slice($reasons, 0, 1 + $i),
];
}

View File

@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class SentReceivedFilterTest extends AbstractFilterTest

View File

@@ -19,6 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class UserFilterTest extends AbstractFilterTest

View File

@@ -19,6 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
*
* @coversNothing
*/
final class UserScopeFilterTest extends AbstractFilterTest