mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-06 21:39:42 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -23,6 +23,7 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class ReportVoterTest extends KernelTestCase
|
||||
@@ -123,7 +124,6 @@ final class ReportVoterTest extends KernelTestCase
|
||||
* @dataProvider dataProvider
|
||||
*
|
||||
* @param type $expectedResult
|
||||
* @param User $user
|
||||
* @param type $action
|
||||
* @param type $message
|
||||
*/
|
||||
@@ -132,7 +132,7 @@ final class ReportVoterTest extends KernelTestCase
|
||||
Report $report,
|
||||
$action,
|
||||
$message,
|
||||
?User $user = null
|
||||
User $user = null
|
||||
) {
|
||||
$token = $this->prepareToken($user);
|
||||
$result = $this->voter->vote($token, $report, [$action]);
|
||||
@@ -157,15 +157,13 @@ final class ReportVoterTest extends KernelTestCase
|
||||
*
|
||||
* if $permissions = null, user will be null (no user associated with token
|
||||
*
|
||||
* @param User $user
|
||||
*
|
||||
* @return \Symfony\Component\Security\Core\Authentication\Token\TokenInterface
|
||||
*/
|
||||
protected function prepareToken(?User $user = null)
|
||||
protected function prepareToken(User $user = null)
|
||||
{
|
||||
$token = $this->prophet->prophesize();
|
||||
$token
|
||||
->willImplement('\\' . \Symfony\Component\Security\Core\Authentication\Token\TokenInterface::class);
|
||||
->willImplement('\\'.\Symfony\Component\Security\Core\Authentication\Token\TokenInterface::class);
|
||||
|
||||
if (null === $user) {
|
||||
$token->getUser()->willReturn(null);
|
||||
|
Reference in New Issue
Block a user