mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 20:43:49 +00:00
update code style after upgrade rector and phpstan
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user