update code style after upgrade rector and phpstan

This commit is contained in:
2024-08-28 14:03:26 +02:00
parent bb848746d5
commit 8a374864fa
10 changed files with 22 additions and 41 deletions

View File

@@ -44,8 +44,8 @@ class AbstractStoredObjectVoterTest extends TestCase
// Anonymous class extending the abstract class
return new class ($canBeAssociatedWithWorkflow, $repository, $security, $workflowDocumentService) extends AbstractStoredObjectVoter {
public function __construct(
private bool $canBeAssociatedWithWorkflow,
private AssociatedEntityToStoredObjectInterface $repository,
private readonly bool $canBeAssociatedWithWorkflow,
private readonly AssociatedEntityToStoredObjectInterface $repository,
Security $security,
?WorkflowStoredObjectPermissionHelper $workflowDocumentService = null
) {
@@ -101,7 +101,7 @@ class AbstractStoredObjectVoterTest extends TestCase
public function testSupportsOnAttribute(): void
{
list($user, $token, $subject, $entity) = $this->setupMockObjects();
[$user, $token, $subject, $entity] = $this->setupMockObjects();
// Setup mocks for voteOnAttribute method
$this->setupMocksForVoteOnAttribute($user, $token, true, $entity, true);
@@ -112,7 +112,7 @@ class AbstractStoredObjectVoterTest extends TestCase
public function testVoteOnAttributeAllowedAndWorkflowAllowed(): void
{
list($user, $token, $subject, $entity) = $this->setupMockObjects();
[$user, $token, $subject, $entity] = $this->setupMockObjects();
// Setup mocks for voteOnAttribute method
$this->setupMocksForVoteOnAttribute($user, $token, true, $entity, true);
@@ -124,7 +124,7 @@ class AbstractStoredObjectVoterTest extends TestCase
public function testVoteOnAttributeNotAllowed(): void
{
list($user, $token, $subject, $entity) = $this->setupMockObjects();
[$user, $token, $subject, $entity] = $this->setupMockObjects();
// Setup mocks for voteOnAttribute method where isGranted() returns false
$this->setupMocksForVoteOnAttribute($user, $token, false, $entity, true);
@@ -136,7 +136,7 @@ class AbstractStoredObjectVoterTest extends TestCase
public function testVoteOnAttributeAllowedWorkflowNotAllowed(): void
{
list($user, $token, $subject, $entity) = $this->setupMockObjects();
[$user, $token, $subject, $entity] = $this->setupMockObjects();
// Setup mocks for voteOnAttribute method
$this->setupMocksForVoteOnAttribute($user, $token, true, $entity, false);
@@ -152,7 +152,7 @@ class AbstractStoredObjectVoterTest extends TestCase
public function testVoteOnAttributeAllowedWorkflowAllowedToSeeDocument(): void
{
list($user, $token, $subject, $entity) = $this->setupMockObjects();
[$user, $token, $subject, $entity] = $this->setupMockObjects();
// Setup mocks for voteOnAttribute method
$this->setupMocksForVoteOnAttribute($user, $token, true, $entity, false);