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

@@ -19,12 +19,11 @@ declare(strict_types=1);
namespace Chill\CalendarBundle\Tests\Service\ShortMessageNotification;
use Chill\CalendarBundle\Service\ShortMessageNotification\DefaultRangeGenerator;
use DateTimeImmutable;
use Iterator;
use PHPUnit\Framework\TestCase;
/**
* @internal
*
* @coversNothing
*/
final class DefaultRangeGeneratorTest extends TestCase
@@ -36,46 +35,46 @@ final class DefaultRangeGeneratorTest extends TestCase
* * Jeudi => envoi des rdv du samedi et dimanche
* * Vendredi => Envoi des rdv du lundi.
*/
public function generateData(): Iterator
public function generateData(): \Iterator
{
yield [
new DateTimeImmutable('2022-06-13 10:45:00'),
new DateTimeImmutable('2022-06-14 00:00:00'),
new DateTimeImmutable('2022-06-16 00:00:00'),
new \DateTimeImmutable('2022-06-13 10:45:00'),
new \DateTimeImmutable('2022-06-14 00:00:00'),
new \DateTimeImmutable('2022-06-16 00:00:00'),
];
yield [
new DateTimeImmutable('2022-06-14 15:45:00'),
new DateTimeImmutable('2022-06-16 00:00:00'),
new DateTimeImmutable('2022-06-17 00:00:00'),
new \DateTimeImmutable('2022-06-14 15:45:00'),
new \DateTimeImmutable('2022-06-16 00:00:00'),
new \DateTimeImmutable('2022-06-17 00:00:00'),
];
yield [
new DateTimeImmutable('2022-06-15 13:45:18'),
new DateTimeImmutable('2022-06-17 00:00:00'),
new DateTimeImmutable('2022-06-18 00:00:00'),
new \DateTimeImmutable('2022-06-15 13:45:18'),
new \DateTimeImmutable('2022-06-17 00:00:00'),
new \DateTimeImmutable('2022-06-18 00:00:00'),
];
yield [
new DateTimeImmutable('2022-06-16 01:30:55'),
new DateTimeImmutable('2022-06-18 00:00:00'),
new DateTimeImmutable('2022-06-20 00:00:00'),
new \DateTimeImmutable('2022-06-16 01:30:55'),
new \DateTimeImmutable('2022-06-18 00:00:00'),
new \DateTimeImmutable('2022-06-20 00:00:00'),
];
yield [
new DateTimeImmutable('2022-06-17 21:30:55'),
new DateTimeImmutable('2022-06-20 00:00:00'),
new DateTimeImmutable('2022-06-21 00:00:00'),
new \DateTimeImmutable('2022-06-17 21:30:55'),
new \DateTimeImmutable('2022-06-20 00:00:00'),
new \DateTimeImmutable('2022-06-21 00:00:00'),
];
yield [
new DateTimeImmutable('2022-06-18 21:30:55'),
new \DateTimeImmutable('2022-06-18 21:30:55'),
null,
null,
];
yield [
new DateTimeImmutable('2022-06-19 21:30:55'),
new \DateTimeImmutable('2022-06-19 21:30:55'),
null,
null,
];
@@ -84,7 +83,7 @@ final class DefaultRangeGeneratorTest extends TestCase
/**
* @dataProvider generateData
*/
public function testGenerateRange(DateTimeImmutable $date, ?DateTimeImmutable $startDate, ?DateTimeImmutable $endDate)
public function testGenerateRange(\DateTimeImmutable $date, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate)
{
$generator = new DefaultRangeGenerator();
@@ -94,8 +93,8 @@ final class DefaultRangeGeneratorTest extends TestCase
$this->assertNull($actualStartDate);
$this->assertNull($actualEndDate);
} else {
$this->assertEquals($startDate->format(DateTimeImmutable::ATOM), $actualStartDate->format(DateTimeImmutable::ATOM));
$this->assertEquals($endDate->format(DateTimeImmutable::ATOM), $actualEndDate->format(DateTimeImmutable::ATOM));
$this->assertEquals($startDate->format(\DateTimeImmutable::ATOM), $actualStartDate->format(\DateTimeImmutable::ATOM));
$this->assertEquals($endDate->format(\DateTimeImmutable::ATOM), $actualEndDate->format(\DateTimeImmutable::ATOM));
}
}
}