mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-18 19:22:49 +00:00
fix phpstan, cs, and rector rules
This commit is contained in:
@@ -29,7 +29,7 @@ class JWTOnDavUrlAuthenticator extends JWTTokenAuthenticator
|
||||
TokenExtractorInterface $tokenExtractor,
|
||||
private readonly DavOnUrlTokenExtractor $davOnUrlTokenExtractor,
|
||||
TokenStorageInterface $preAuthenticationTokenStorage,
|
||||
TranslatorInterface $translator = null,
|
||||
?TranslatorInterface $translator = null,
|
||||
) {
|
||||
parent::__construct($jwtManager, $dispatcher, $tokenExtractor, $preAuthenticationTokenStorage, $translator);
|
||||
}
|
||||
|
@@ -149,7 +149,7 @@ final readonly class WopiEditTwigExtensionRuntime implements RuntimeExtensionInt
|
||||
* @throws \Twig\Error\RuntimeError
|
||||
* @throws \Twig\Error\SyntaxError
|
||||
*/
|
||||
public function renderButtonGroup(Environment $environment, StoredObject $document, string $title = null, bool $canEdit = true, array $options = []): string
|
||||
public function renderButtonGroup(Environment $environment, StoredObject $document, ?string $title = null, bool $canEdit = true, array $options = []): string
|
||||
{
|
||||
$accessToken = $this->davTokenProvider->createToken(
|
||||
$document,
|
||||
@@ -174,7 +174,7 @@ final readonly class WopiEditTwigExtensionRuntime implements RuntimeExtensionInt
|
||||
]);
|
||||
}
|
||||
|
||||
public function renderEditButton(Environment $environment, StoredObject $document, array $options = null): string
|
||||
public function renderEditButton(Environment $environment, StoredObject $document, ?array $options = null): string
|
||||
{
|
||||
return $environment->render(self::TEMPLATE, [
|
||||
'document' => $document,
|
||||
|
@@ -32,7 +32,7 @@ class StoredObjectVoterTest extends TestCase
|
||||
/**
|
||||
* @dataProvider provideDataVote
|
||||
*/
|
||||
public function testVote(TokenInterface $token, null|object $subject, string $attribute, mixed $expected): void
|
||||
public function testVote(TokenInterface $token, ?object $subject, string $attribute, mixed $expected): void
|
||||
{
|
||||
$voter = new StoredObjectVoter();
|
||||
|
||||
@@ -98,7 +98,7 @@ class StoredObjectVoterTest extends TestCase
|
||||
];
|
||||
}
|
||||
|
||||
private function buildToken(StoredObjectRoleEnum $storedObjectRoleEnum = null, StoredObject $storedObject = null): TokenInterface
|
||||
private function buildToken(?StoredObjectRoleEnum $storedObjectRoleEnum = null, ?StoredObject $storedObject = null): TokenInterface
|
||||
{
|
||||
$token = $this->prophesize(TokenInterface::class);
|
||||
|
||||
|
Reference in New Issue
Block a user