DX: more cs

This commit is contained in:
Julien Fastré 2022-11-02 14:40:17 +01:00
parent 2ee362bfd5
commit 2e60b6735a
4 changed files with 5 additions and 9 deletions

View File

@ -22,15 +22,11 @@ class SentReceivedAggregator implements AggregatorInterface
{ {
private TranslatorInterface $translator; private TranslatorInterface $translator;
/**
* @param TranslatorInterface $translator
*/
public function __construct(TranslatorInterface $translator) public function __construct(TranslatorInterface $translator)
{ {
$this->translator = $translator; $this->translator = $translator;
} }
public function addRole(): ?string public function addRole(): ?string
{ {
return null; return null;

View File

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

View File

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

View File

@ -114,7 +114,7 @@ final class AccompanyingPeriodSocialIssueConsistencyEntityListenerTest extends T
protected function generateClass(AccompanyingPeriod $period, Collection $socialIssues): AccompanyingPeriodLinkedWithSocialIssuesEntityInterface protected function generateClass(AccompanyingPeriod $period, Collection $socialIssues): AccompanyingPeriodLinkedWithSocialIssuesEntityInterface
{ {
return new class ($period, $socialIssues) implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterface { return new class($period, $socialIssues) implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterface {
public Collection $socialIssues; public Collection $socialIssues;
public AccompanyingPeriod $period; public AccompanyingPeriod $period;