@@ -74,7 +74,7 @@ |
||
| 74 | 74 | /** |
| 75 | 75 | * @param string $token |
| 76 | 76 | * |
| 77 | - * @return UserInterface|null |
|
| 77 | + * @return User|null |
|
| 78 | 78 | */ |
| 79 | 79 | public function findByPasswordResetToken($token) |
| 80 | 80 | { |
@@ -23,8 +23,8 @@ |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * @param UserDataTransferObject $userDataTransferObject |
|
| 27 | - */ |
|
| 26 | + * @param UserDataTransferObject $userDataTransferObject |
|
| 27 | + */ |
|
| 28 | 28 | public function handle(UserDataTransferObject $userDataTransferObject) |
| 29 | 29 | { |
| 30 | 30 | $newUser = $userDataTransferObject->getEntity(); |
@@ -66,6 +66,6 @@ |
||
| 66 | 66 | |
| 67 | 67 | $this->handler->handle($userWithPasswordTransferObject); |
| 68 | 68 | |
| 69 | - $output->writeln($userWithPasswordTransferObject->userName . ' has been created'); |
|
| 69 | + $output->writeln($userWithPasswordTransferObject->userName.' has been created'); |
|
| 70 | 70 | } |
| 71 | 71 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function getRoles() |
| 32 | 32 | { |
| 33 | - return [ 'ROLE_USER' ]; |
|
| 33 | + return ['ROLE_USER']; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -9,8 +9,6 @@ |
||
| 9 | 9 | use SumoCoders\FrameworkMultiUserBundle\User\UserWithPassword; |
| 10 | 10 | use Symfony\Component\Security\Core\Encoder\EncoderFactory; |
| 11 | 11 | use Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder; |
| 12 | -use Symfony\Component\Security\Core\Encoder\UserPasswordEncoder; |
|
| 13 | -use Symfony\Component\Security\Core\Tests\Encoder\PasswordEncoder; |
|
| 14 | 12 | |
| 15 | 13 | class CreateUserHandlerTest extends \PHPUnit_Framework_TestCase |
| 16 | 14 | { |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | $this->userRepository->findByUsername('sumo')->getDisplayName() |
| 57 | 57 | ); |
| 58 | 58 | $this->assertEquals( |
| 59 | - 'randomPassword{' . $this->userRepository->findByUsername('sumo')->getSalt() . '}', |
|
| 59 | + 'randomPassword{'.$this->userRepository->findByUsername('sumo')->getSalt().'}', |
|
| 60 | 60 | $this->userRepository->findByUsername('sumo')->getPassword() |
| 61 | 61 | ); |
| 62 | 62 | $this->assertEquals( |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | |
| 84 | 84 | private function getCredentials($salt = 'zout', $username = 'wouter', $password = 'test') |
| 85 | 85 | { |
| 86 | - $mock = $this->getMock(FormCredentials::class, [], [$username, $password . '{' . $salt . '}']); |
|
| 86 | + $mock = $this->getMock(FormCredentials::class, [], [$username, $password.'{'.$salt.'}']); |
|
| 87 | 87 | $mock->method('getUserName')->willReturn($username); |
| 88 | 88 | $mock->method('getPlainPassword')->willReturn($password); |
| 89 | 89 | |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | $this->userRepository->findByUsername('wouter')->getDisplayName() |
| 59 | 59 | ); |
| 60 | 60 | $this->assertEquals( |
| 61 | - 'randomPassword{' . $this->userRepository->findByUsername('wouter')->getSalt() . '}', |
|
| 61 | + 'randomPassword{'.$this->userRepository->findByUsername('wouter')->getSalt().'}', |
|
| 62 | 62 | $this->userRepository->findByUsername('wouter')->getPassword() |
| 63 | 63 | ); |
| 64 | 64 | $this->assertNotEquals( |