DX: more code style fixes

This commit is contained in:
2022-11-02 14:06:10 +01:00
parent 5655f953d7
commit 055acbf43c
21 changed files with 131 additions and 47 deletions

View File

@@ -134,7 +134,9 @@ final class NotificationTest extends KernelTestCase
$this->assertEquals($senderId, $notification->getSender()->getId());
$this->assertCount(count($addressesIds), $notification->getUnreadBy());
$unreadIds = $notification->getUnreadBy()->map(static function (User $u) { return $u->getId(); });
$unreadIds = $notification->getUnreadBy()->map(static function (User $u) {
return $u->getId();
});
foreach ($addressesIds as $addresseeId) {
$this->assertContains($addresseeId, $unreadIds);

View File

@@ -96,7 +96,9 @@ final class ScopePickerTypeTest extends TypeTestCase
$translatableStringHelper = $this->prophesize(TranslatableStringHelperInterface::class);
$translatableStringHelper->localize(Argument::type('array'))->will(
static function ($args) { return $args[0]['fr']; }
static function ($args) {
return $args[0]['fr'];
}
);
$type = new ScopePickerType(

View File

@@ -211,7 +211,9 @@ final class AuthorizationHelperTest extends KernelTestCase
$centerA
);
$usernames = array_map(static function (User $u) { return $u->getUsername(); }, $users);
$usernames = array_map(static function (User $u) {
return $u->getUsername();
}, $users);
$this->assertContains('center a_social', $usernames);
}

View File

@@ -33,7 +33,7 @@ final class DefaultScopeResolverTest extends TestCase
public function testHasScopeInterface()
{
$scope = new Scope();
$entity = new class($scope) implements HasScopeInterface {
$entity = new class ($scope) implements HasScopeInterface {
public function __construct(Scope $scope)
{
$this->scope = $scope;
@@ -52,7 +52,7 @@ final class DefaultScopeResolverTest extends TestCase
public function testHasScopesInterface()
{
$entity = new class($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
$entity = new class ($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
public function __construct(Scope $scopeA, Scope $scopeB)
{
$this->scopes = [$scopeA, $scopeB];

View File

@@ -34,7 +34,7 @@ final class ScopeResolverDispatcherTest extends TestCase
public function testHasScopeInterface()
{
$scope = new Scope();
$entity = new class($scope) implements HasScopeInterface {
$entity = new class ($scope) implements HasScopeInterface {
public function __construct(Scope $scope)
{
$this->scope = $scope;
@@ -52,7 +52,7 @@ final class ScopeResolverDispatcherTest extends TestCase
public function testHasScopesInterface()
{
$entity = new class($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
$entity = new class ($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
public function __construct(Scope $scopeA, Scope $scopeB)
{
$this->scopes = [$scopeA, $scopeB];