php cs fixes after updating php cs fixer

This commit is contained in:
2024-01-10 10:31:25 +01:00
parent 60ede58af0
commit 3c8e59e088
682 changed files with 2097 additions and 882 deletions

View File

@@ -258,8 +258,8 @@ final class AuthorizationHelperTest extends KernelTestCase
]);
$helper = $this->getAuthorizationHelper();
$entity = $this->prophesize();
$entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class);
$entity->willImplement('\\'.\Chill\MainBundle\Entity\HasScopeInterface::class);
$entity->willImplement('\\'.HasCenterInterface::class);
$entity->willImplement('\\'.HasScopeInterface::class);
$entity->getCenter()->willReturn($center);
$entity->getScope()->willReturn($scope);
@@ -383,7 +383,7 @@ final class AuthorizationHelperTest extends KernelTestCase
]);
$helper = $this->getAuthorizationHelper();
$entity = $this->prophesize();
$entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class);
$entity->willImplement('\\'.HasCenterInterface::class);
$entity->getCenter()->willReturn($center);
$this->assertTrue($helper->userHasAccess(
@@ -407,7 +407,7 @@ final class AuthorizationHelperTest extends KernelTestCase
$helper = $this->getAuthorizationHelper();
$entity = $this->prophesize();
$entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class);
$entity->willImplement('\\'.HasCenterInterface::class);
$entity->getCenter()->willReturn($center);
$this->assertTrue($helper->userHasAccess(
@@ -431,8 +431,8 @@ final class AuthorizationHelperTest extends KernelTestCase
]);
$helper = $this->getAuthorizationHelper();
$entity = $this->prophesize();
$entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class);
$entity->willImplement('\\'.\Chill\MainBundle\Entity\HasScopeInterface::class);
$entity->willImplement('\\'.HasCenterInterface::class);
$entity->willImplement('\\'.HasScopeInterface::class);
$entity->getCenter()->willReturn($centerB);
$entity->getScope()->willReturn($scope);
@@ -452,7 +452,7 @@ final class AuthorizationHelperTest extends KernelTestCase
]);
$helper = $this->getAuthorizationHelper();
$entity = $this->prophesize();
$entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class);
$entity->willImplement('\\'.HasCenterInterface::class);
$entity->getCenter()->willReturn($center);
$this->assertFalse($helper->userHasAccess($user, $entity->reveal(), 'CHILL_ROLE'));
@@ -471,8 +471,8 @@ final class AuthorizationHelperTest extends KernelTestCase
]);
$helper = $this->getAuthorizationHelper();
$entity = $this->prophesize();
$entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class);
$entity->willImplement('\\'.\Chill\MainBundle\Entity\HasScopeInterface::class);
$entity->willImplement('\\'.HasCenterInterface::class);
$entity->willImplement('\\'.HasScopeInterface::class);
$entity->getCenter()->willReturn($center);
$entity->getScope()->willReturn($scope);
@@ -503,7 +503,7 @@ final class AuthorizationHelperTest extends KernelTestCase
]);
$helper = $this->getAuthorizationHelper();
$entity = $this->prophesize();
$entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class);
$entity->willImplement('\\'.HasCenterInterface::class);
$entity->getCenter()->willReturn($centerA);
$this->assertFalse($helper->userHasAccess($user, $entity->reveal(), 'CHILL_ROLE'));
@@ -577,7 +577,7 @@ final class AuthorizationHelperTest extends KernelTestCase
}
/**
* @return \Chill\MainBundle\Security\Authorization\AuthorizationHelper
* @return AuthorizationHelper
*/
private function getAuthorizationHelper()
{

View File

@@ -34,7 +34,9 @@ final class TokenManagerTest extends KernelTestCase
$this->tokenManager = new TokenManager('secret', $logger);
}
public static function setUpBefore() {}
public static function setUpBefore()
{
}
public function testGenerate()
{

View File

@@ -35,7 +35,9 @@ final class DefaultScopeResolverTest extends TestCase
{
$scope = new Scope();
$entity = new class ($scope) implements HasScopeInterface {
public function __construct(private readonly Scope $scope) {}
public function __construct(private readonly Scope $scope)
{
}
public function getScope()
{
@@ -51,7 +53,9 @@ final class DefaultScopeResolverTest extends TestCase
public function testHasScopesInterface()
{
$entity = new class ($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
public function __construct(private readonly Scope $scopeA, private readonly Scope $scopeB) {}
public function __construct(private readonly Scope $scopeA, private readonly Scope $scopeB)
{
}
public function getScopes(): iterable
{

View File

@@ -36,7 +36,9 @@ final class ScopeResolverDispatcherTest extends TestCase
{
$scope = new Scope();
$entity = new class ($scope) implements HasScopeInterface {
public function __construct(private readonly Scope $scope) {}
public function __construct(private readonly Scope $scope)
{
}
public function getScope()
{