Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Dec 3, 2023
1 parent a7b9df4 commit 2e2694e
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 16 deletions.
5 changes: 5 additions & 0 deletions phpstan-baseline.neon
Expand Up @@ -135,6 +135,11 @@ parameters:
count: 1
path: tests/DependencyInjection/NucleosUserExtensionTest.php

-
message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\TestCase\\:\\:createStub\\(\\)\\.$#"
count: 1
path: tests/Form/Type/ResettingFormTypeTest.php

-
message: "#^Method Nucleos\\\\UserBundle\\\\Tests\\\\Model\\\\BaseUserManagerTest\\:\\:getUserManager\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
count: 1
Expand Down
6 changes: 3 additions & 3 deletions psalm-baseline.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.7.7@e028ba46ba0d7f9a78bc3201c251e137383e145f">
<file src="src/Action/UpdateSecurityAction.php">
<files psalm-version="5.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591">
<file src="src/Action/ResetAction.php">
<InvalidNullableReturnType>
<code>Response</code>
</InvalidNullableReturnType>
<NullableReturnStatement>
<code><![CDATA[$event->getResponse()]]></code>
</NullableReturnStatement>
</file>
<file src="src/Action/ResetAction.php">
<file src="src/Action/UpdateSecurityAction.php">
<InvalidNullableReturnType>
<code>Response</code>
</InvalidNullableReturnType>
Expand Down
5 changes: 5 additions & 0 deletions src/Action/RequestResetAction.php
Expand Up @@ -53,12 +53,17 @@ final class RequestResetAction

private readonly int $retryTtl;

/**
* @var UserProviderInterface<UserInterface>
*/
private readonly UserProviderInterface $userProvider;

private readonly TranslatorInterface $translator;

/**
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*
* @param UserProviderInterface<UserInterface> $userProvider
*/
public function __construct(
Environment $twig,
Expand Down
4 changes: 1 addition & 3 deletions src/Event/GetResponseNullableUserEvent.php
Expand Up @@ -13,6 +13,4 @@

namespace Nucleos\UserBundle\Event;

final class GetResponseNullableUserEvent extends GetResponseUserEvent
{
}
final class GetResponseNullableUserEvent extends GetResponseUserEvent {}
4 changes: 1 addition & 3 deletions src/Mailer/NoopResettingMailer.php
Expand Up @@ -17,7 +17,5 @@

final class NoopResettingMailer implements ResettingMailer
{
public function sendResettingEmailMessage(UserInterface $user): void
{
}
public function sendResettingEmailMessage(UserInterface $user): void {}
}
3 changes: 3 additions & 0 deletions src/Security/UserProvider.php
Expand Up @@ -21,6 +21,9 @@
use Symfony\Component\Security\Core\User\UserInterface as SecurityUserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;

/**
* @phpstan-implements UserProviderInterface<UserInterface>
*/
class UserProvider implements UserProviderInterface
{
protected UserManager $userManager;
Expand Down
1 change: 0 additions & 1 deletion src/Validator/Constraints/Pattern.php
Expand Up @@ -18,7 +18,6 @@

/**
* @Annotation
*
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
*/
#[Attribute(Attribute::TARGET_PROPERTY | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
Expand Down
4 changes: 1 addition & 3 deletions tests/App/Entity/TestGroup.php
Expand Up @@ -15,6 +15,4 @@

use Nucleos\UserBundle\Model\Group;

class TestGroup extends Group
{
}
class TestGroup extends Group {}
4 changes: 1 addition & 3 deletions tests/App/Entity/TestUser.php
Expand Up @@ -19,6 +19,4 @@
/**
* @phpstan-extends User<GroupInterface>
*/
class TestUser extends User
{
}
class TestUser extends User {}

0 comments on commit 2e2694e

Please sign in to comment.