@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $app['silex_user.options'] = []; |
80 | 80 | |
81 | 81 | // Services |
82 | - $app['silex_user.user_manager'] = function ($app) { |
|
82 | + $app['silex_user.user_manager'] = function($app) { |
|
83 | 83 | $this->validateOptions($app); |
84 | 84 | |
85 | 85 | return new UserManager( |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | ); |
90 | 90 | }; |
91 | 91 | |
92 | - $app['silex_user.login_manager'] = function ($app) { |
|
92 | + $app['silex_user.login_manager'] = function($app) { |
|
93 | 93 | return new LoginManager( |
94 | 94 | $app['security.token_storage'], |
95 | 95 | $app['security.user_checker'], |
@@ -98,15 +98,15 @@ discard block |
||
98 | 98 | ); |
99 | 99 | }; |
100 | 100 | |
101 | - $app['silex_user.user_provider.username'] = function ($app) { |
|
101 | + $app['silex_user.user_provider.username'] = function($app) { |
|
102 | 102 | return new UserProvider($app['silex_user.user_manager']); |
103 | 103 | }; |
104 | 104 | |
105 | - $app['silex_user.user_provider.username_email'] = function ($app) { |
|
105 | + $app['silex_user.user_provider.username_email'] = function($app) { |
|
106 | 106 | return new EmailUserProvider($app['silex_user.user_manager']); |
107 | 107 | }; |
108 | 108 | |
109 | - $app['silex_user.mailer'] = function ($app) { |
|
109 | + $app['silex_user.mailer'] = function($app) { |
|
110 | 110 | if (isset($app['mailer']) && get_class($app['mailer']) === 'Swift_Mailer') { |
111 | 111 | $parameters = [ |
112 | 112 | 'from_email' => [ |
@@ -120,16 +120,16 @@ discard block |
||
120 | 120 | return null; |
121 | 121 | }; |
122 | 122 | |
123 | - $app['silex_user.util.user_manipulator'] = function ($app) { |
|
123 | + $app['silex_user.util.user_manipulator'] = function($app) { |
|
124 | 124 | return new UserManipulator($app['silex_user.user_manager'], $app['dispatcher'], $app['request_stack']); |
125 | 125 | }; |
126 | 126 | |
127 | 127 | // Controllers |
128 | - $app['auth.controller'] = function ($app) { |
|
128 | + $app['auth.controller'] = function($app) { |
|
129 | 129 | return new AuthController($app); |
130 | 130 | }; |
131 | 131 | |
132 | - $app['registration.controller'] = function ($app) { |
|
132 | + $app['registration.controller'] = function($app) { |
|
133 | 133 | return new RegistrationController($app); |
134 | 134 | }; |
135 | 135 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | if (!$input->getArgument('username')) { |
73 | 73 | $question = new Question('Please give the username:'); |
74 | - $question->setValidator(function ($username) { |
|
74 | + $question->setValidator(function($username) { |
|
75 | 75 | if (empty($username)) { |
76 | 76 | throw new Exception('Username can not be empty'); |
77 | 77 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | if (!$input->getArgument('password')) { |
85 | 85 | $question = new Question('Please enter the new password:'); |
86 | - $question->setValidator(function ($password) { |
|
86 | + $question->setValidator(function($password) { |
|
87 | 87 | if (empty($password)) { |
88 | 88 | throw new Exception('Password can not be empty'); |
89 | 89 | } |
@@ -60,7 +60,7 @@ |
||
60 | 60 | { |
61 | 61 | if (!$input->getArgument('username')) { |
62 | 62 | $question = new Question('Please choose a username:'); |
63 | - $question->setValidator(function ($username) { |
|
63 | + $question->setValidator(function($username) { |
|
64 | 64 | if (empty($username)) { |
65 | 65 | throw new \Exception('Username can not be empty'); |
66 | 66 | } |
@@ -60,7 +60,7 @@ |
||
60 | 60 | { |
61 | 61 | if (!$input->getArgument('username')) { |
62 | 62 | $question = new Question('Please choose a username:'); |
63 | - $question->setValidator(function ($username) { |
|
63 | + $question->setValidator(function($username) { |
|
64 | 64 | if (empty($username)) { |
65 | 65 | throw new \Exception('Username can not be empty'); |
66 | 66 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | if (!$input->getArgument('username')) { |
81 | 81 | $question = new Question('Please choose a username:'); |
82 | - $question->setValidator(function ($username) { |
|
82 | + $question->setValidator(function($username) { |
|
83 | 83 | if (empty($username)) { |
84 | 84 | throw new \Exception('Username can not be empty'); |
85 | 85 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | if ((true !== $input->getOption('super')) && !$input->getArgument('role')) { |
93 | 93 | $question = new Question('Please choose a role:'); |
94 | - $question->setValidator(function ($role) { |
|
94 | + $question->setValidator(function($role) { |
|
95 | 95 | if (empty($role)) { |
96 | 96 | throw new \Exception('Role can not be empty'); |
97 | 97 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | if (!$input->getArgument('username')) { |
91 | 91 | $question = new Question('Please choose a username:'); |
92 | - $question->setValidator(function ($username) { |
|
92 | + $question->setValidator(function($username) { |
|
93 | 93 | if (empty($username)) { |
94 | 94 | throw new Exception('Username can not be empty'); |
95 | 95 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | if (!$input->getArgument('email')) { |
103 | 103 | $question = new Question('Please choose an email:'); |
104 | - $question->setValidator(function ($email) { |
|
104 | + $question->setValidator(function($email) { |
|
105 | 105 | if (empty($email)) { |
106 | 106 | throw new Exception('Email can not be empty'); |
107 | 107 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | if (!$input->getArgument('password')) { |
115 | 115 | $question = new Question('Please choose a password:'); |
116 | - $question->setValidator(function ($password) { |
|
116 | + $question->setValidator(function($password) { |
|
117 | 117 | if (empty($password)) { |
118 | 118 | throw new Exception('Password can not be empty'); |
119 | 119 | } |