mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 17:15:02 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class BySocialActionAggregatorTest extends AbstractAggregatorTest
|
||||
|
@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class BySocialIssueAggregatorTest extends AbstractAggregatorTest
|
||||
|
@@ -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
|
||||
|
@@ -21,6 +21,7 @@ use Prophecy\PhpUnit\ProphecyTrait;
|
||||
* Add tests for ActivityUsernAggregator.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ActivityUserAggregatorTest extends AbstractAggregatorTest
|
||||
|
@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ByThirdpartyAggregatorTest extends AbstractAggregatorTest
|
||||
|
@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ByUserAggregatorTest extends AbstractAggregatorTest
|
||||
|
@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class CreatorScopeAggregatorTest extends AbstractAggregatorTest
|
||||
|
@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class DateAggregatorTest extends AbstractAggregatorTest
|
||||
|
@@ -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();
|
||||
|
@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class LocationTypeAggregatorTest extends AbstractAggregatorTest
|
||||
|
@@ -19,6 +19,7 @@ use Prophecy\PhpUnit\ProphecyTrait;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ActivityReasonAggregatorTest extends AbstractAggregatorTest
|
||||
|
@@ -16,6 +16,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class AvgActivityDurationTest extends AbstractExportTest
|
||||
|
@@ -16,6 +16,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class AvgActivityVisitDurationTest extends AbstractExportTest
|
||||
|
@@ -16,6 +16,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class CountActivityTest extends AbstractExportTest
|
||||
|
@@ -16,6 +16,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class SumActivityDurationTest extends AbstractExportTest
|
||||
|
@@ -16,6 +16,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class SumActivityVisitDurationTest extends AbstractExportTest
|
||||
|
@@ -16,6 +16,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class CountActivityTest extends AbstractExportTest
|
||||
|
@@ -17,6 +17,7 @@ use Prophecy\PhpUnit\ProphecyTrait;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ListActivityTest extends AbstractExportTest
|
||||
|
@@ -18,6 +18,7 @@ use Chill\MainBundle\Test\Export\AbstractExportTest;
|
||||
* Test the "sum" part of StatActivityDuration.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class StatActivityDurationTest extends AbstractExportTest
|
||||
|
@@ -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
|
||||
|
@@ -19,6 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ByCreatorFilterTest extends AbstractFilterTest
|
||||
|
@@ -19,6 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class BySocialActionFilterTest extends AbstractFilterTest
|
||||
|
@@ -20,6 +20,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class BySocialIssueFilterTest extends AbstractFilterTest
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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')
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -19,6 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ByCreatorFilterTest extends AbstractFilterTest
|
||||
|
@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class EmergencyFilterTest extends AbstractFilterTest
|
||||
|
@@ -19,6 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class LocationTypeFilterTest extends AbstractFilterTest
|
||||
|
@@ -20,6 +20,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ActivityReasonFilterTest extends AbstractFilterTest
|
||||
|
@@ -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'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -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),
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -18,6 +18,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class SentReceivedFilterTest extends AbstractFilterTest
|
||||
|
@@ -19,6 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class UserFilterTest extends AbstractFilterTest
|
||||
|
@@ -19,6 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class UserScopeFilterTest extends AbstractFilterTest
|
||||
|
Reference in New Issue
Block a user