mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
DX: more code style fixes
This commit is contained in:
@@ -177,7 +177,9 @@ class ExportAddressHelper
|
||||
$prefixes = array_merge(
|
||||
$prefixes,
|
||||
array_map(
|
||||
static function ($item) use ($prefix) { return $prefix . $item; },
|
||||
static function ($item) use ($prefix) {
|
||||
return $prefix . $item;
|
||||
},
|
||||
self::COLUMN_MAPPING[$key]
|
||||
)
|
||||
);
|
||||
|
@@ -51,7 +51,9 @@ class EntityToJsonTransformer implements DataTransformerInterface
|
||||
}
|
||||
|
||||
return array_map(
|
||||
function ($item) { return $this->denormalizeOne($item); },
|
||||
function ($item) {
|
||||
return $this->denormalizeOne($item);
|
||||
},
|
||||
$denormalized
|
||||
);
|
||||
}
|
||||
|
@@ -66,7 +66,9 @@ class ScopePickerType extends AbstractType
|
||||
$options['role'] instanceof Role ? $options['role']->getRole() : $options['role'],
|
||||
$options['center']
|
||||
),
|
||||
static function (Scope $s) { return $s->isActive(); }
|
||||
static function (Scope $s) {
|
||||
return $s->isActive();
|
||||
}
|
||||
);
|
||||
|
||||
if (0 === count($items)) {
|
||||
|
@@ -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);
|
||||
|
@@ -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(
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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];
|
||||
|
@@ -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];
|
||||
|
@@ -107,7 +107,9 @@ class NotificationOnTransition implements EventSubscriberInterface
|
||||
'dest' => $subscriber,
|
||||
'place' => $place,
|
||||
'workflow' => $workflow,
|
||||
'is_dest' => in_array($subscriber->getId(), array_map(static function (User $u) { return $u->getId(); }, $entityWorkflow->futureDestUsers), true),
|
||||
'is_dest' => in_array($subscriber->getId(), array_map(static function (User $u) {
|
||||
return $u->getId();
|
||||
}, $entityWorkflow->futureDestUsers), true),
|
||||
];
|
||||
|
||||
$notification = new Notification();
|
||||
|
Reference in New Issue
Block a user