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

@@ -13,12 +13,11 @@ namespace Services\RollingDate;
use Chill\MainBundle\Service\RollingDate\RollingDate;
use Chill\MainBundle\Service\RollingDate\RollingDateConverter;
use DateTime;
use DateTimeImmutable;
use PHPUnit\Framework\TestCase;
/**
* @internal
*
* @coversNothing
*/
final class RollingDateConverterTest extends TestCase
@@ -63,7 +62,7 @@ final class RollingDateConverterTest extends TestCase
public function testConversionFixedDate()
{
$rollingDate = new RollingDate(RollingDate::T_FIXED_DATE, new DateTimeImmutable('2022-01-01'));
$rollingDate = new RollingDate(RollingDate::T_FIXED_DATE, new \DateTimeImmutable('2022-01-01'));
$this->assertEquals(
'2022-01-01',
@@ -78,7 +77,7 @@ final class RollingDateConverterTest extends TestCase
$actual = $this->converter->convert($rollingDate);
$this->assertEquals(
(int) (new DateTimeImmutable('now'))->format('Y') - 1,
(int) (new \DateTimeImmutable('now'))->format('Y') - 1,
(int) $actual->format('Y')
);
$this->assertEquals(1, (int) $actual->format('m'));
@@ -90,11 +89,11 @@ final class RollingDateConverterTest extends TestCase
*/
public function testConvertOnPivotDate(string $roll, string $expectedDateTime, string $format)
{
$pivot = DateTimeImmutable::createFromFormat('Y-m-d His', '2022-11-07 000000');
$pivot = \DateTimeImmutable::createFromFormat('Y-m-d His', '2022-11-07 000000');
$rollingDate = new RollingDate($roll, null, $pivot);
$this->assertEquals(
DateTime::createFromFormat($format, $expectedDateTime),
\DateTime::createFromFormat($format, $expectedDateTime),
$this->converter->convert($rollingDate)
);
}