@@ -20,7 +20,7 @@ |
||
20 | 20 | ]) |
21 | 21 | ->useAttributeAsKey('class') |
22 | 22 | ->prototype('array') |
23 | - ->beforeNormalization()->ifString()->then(function ($v) { |
|
23 | + ->beforeNormalization()->ifString()->then(function($v) { |
|
24 | 24 | return ['route' => $v]; |
25 | 25 | })->end() |
26 | 26 | ->children() |
@@ -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( |
@@ -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( |
@@ -61,6 +61,6 @@ |
||
61 | 61 | |
62 | 62 | $this->handler->handle($userTransferObject); |
63 | 63 | |
64 | - $output->writeln($userTransferObject->userName . ' has been created'); |
|
64 | + $output->writeln($userTransferObject->userName.' has been created'); |
|
65 | 65 | } |
66 | 66 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | $this->flashBag->add( |
62 | 62 | 'success', |
63 | 63 | $this->translator->trans( |
64 | - 'sumocoders.multiuserbundle.flash.' . ($user->isBlocked() ? 'block_success' : 'unblock_success') |
|
64 | + 'sumocoders.multiuserbundle.flash.'.($user->isBlocked() ? 'block_success' : 'unblock_success') |
|
65 | 65 | ) |
66 | 66 | ); |
67 | 67 |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $config['redirect_routes'] |
28 | 28 | ); |
29 | 29 | |
30 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
30 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
31 | 31 | $loader->load('console.yml'); |
32 | 32 | $loader->load('controllers.yml'); |
33 | 33 | $loader->load('forms.yml'); |
@@ -57,6 +57,6 @@ |
||
57 | 57 | |
58 | 58 | $this->handler->handle($baseUserTransferObject); |
59 | 59 | |
60 | - $output->writeln($username . ' has been deleted'); |
|
60 | + $output->writeln($username.' has been deleted'); |
|
61 | 61 | } |
62 | 62 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $this->router = $this->getMockBuilder(RouterInterface::class)->getMock(); |
33 | 33 | $this->flashBag = $this->getMockBuilder(FlashBagInterface::class)->getMock(); |
34 | 34 | $this->translator = $this->getMockBuilder(TranslatorInterface::class)->getMock(); |
35 | - $encoders[ 'SumoCoders\FrameworkMultiUserBundle\Entity\BaseUser' ] = [ |
|
35 | + $encoders['SumoCoders\FrameworkMultiUserBundle\Entity\BaseUser'] = [ |
|
36 | 36 | 'class' => 'Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder', |
37 | 37 | 'arguments' => [12], |
38 | 38 | ]; |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
6 | 6 | use SumoCoders\FrameworkMultiUserBundle\Command\Handler; |
7 | 7 | use SumoCoders\FrameworkMultiUserBundle\Form\DeleteType; |
8 | -use SumoCoders\FrameworkMultiUserBundle\Form\Interfaces\FormWithDataTransferObject; |
|
9 | 8 | use SumoCoders\FrameworkMultiUserBundle\User\Interfaces\UserRepository; |
10 | 9 | use Symfony\Component\Form\Form; |
11 | 10 | use Symfony\Component\Form\FormFactoryInterface; |
@@ -108,6 +108,9 @@ |
||
108 | 108 | return ['form' => $form->createView()]; |
109 | 109 | } |
110 | 110 | |
111 | + /** |
|
112 | + * @param integer $id |
|
113 | + */ |
|
111 | 114 | private function getFormForId(?int $id = null): Form |
112 | 115 | { |
113 | 116 | if ($id === null) { |
@@ -108,7 +108,7 @@ |
||
108 | 108 | return ['form' => $form->createView()]; |
109 | 109 | } |
110 | 110 | |
111 | - private function getFormForId(?int $id = null): Form |
|
111 | + private function getFormForId(?int $id = null) : Form |
|
112 | 112 | { |
113 | 113 | if ($id === null) { |
114 | 114 | return $this->formFactory->create($this->form); |