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

@@ -15,13 +15,12 @@ use Chill\MainBundle\Entity\Notification;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Repository\UserRepository;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use DateTimeImmutable;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use function count;
/**
* @internal
*
* @coversNothing
*/
final class NotificationTest extends KernelTestCase
@@ -117,7 +116,7 @@ final class NotificationTest extends KernelTestCase
->setSender($em->find(User::class, $senderId))
->setRelatedEntityId(0)
->setRelatedEntityClass(AccompanyingPeriod::class)
->setUpdatedAt(new DateTimeImmutable())
->setUpdatedAt(new \DateTimeImmutable())
->setMessage('Fake message');
foreach ($addressesIds as $addresseeId) {
@@ -132,7 +131,7 @@ final class NotificationTest extends KernelTestCase
$this->toDelete[] = [Notification::class, $notification->getId()];
$this->assertEquals($senderId, $notification->getSender()->getId());
$this->assertCount(count($addressesIds), $notification->getUnreadBy());
$this->assertCount(\count($addressesIds), $notification->getUnreadBy());
$unreadIds = $notification->getUnreadBy()->map(static fn (User $u) => $u->getId());

View File

@@ -19,6 +19,7 @@ use Prophecy\PhpUnit\ProphecyTrait;
/**
* @internal
*
* @coversNothing
*/
class UserTest extends TestCase
@@ -44,7 +45,6 @@ class UserTest extends TestCase
->filter(fn (User\UserScopeHistory $userScopeHistory) => $userScopeHistory->getScope() === $scopeA)
->first()->getEndDate()
);
}
public function testUserJobHistory()
@@ -67,5 +67,4 @@ class UserTest extends TestCase
->first()->getEndDate()
);
}
}

View File

@@ -16,6 +16,7 @@ use PHPUnit\Framework\TestCase;
/**
* @internal
*
* @coversNothing
*/
final class EntityWorkflowTest extends TestCase