@@ -37,14 +37,14 @@ |
||
37 | 37 | $this->options['allowName'] = isset($options['allowName']) ? $options['allowName'] : null; |
38 | 38 | } |
39 | 39 | |
40 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
41 | - { |
|
42 | - $auth = $container->get('AuthenticationService'); |
|
43 | - $user = $auth->getUser(); |
|
44 | - $options = $this->options; |
|
45 | - $options['user'] = $user; |
|
46 | - $validator = new UniqueGroupName($options); |
|
40 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
41 | + { |
|
42 | + $auth = $container->get('AuthenticationService'); |
|
43 | + $user = $auth->getUser(); |
|
44 | + $options = $this->options; |
|
45 | + $options['user'] = $user; |
|
46 | + $validator = new UniqueGroupName($options); |
|
47 | 47 | |
48 | - return $validator; |
|
49 | - } |
|
48 | + return $validator; |
|
49 | + } |
|
50 | 50 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $this->options['allowName'] = isset($options['allowName']) ? $options['allowName'] : null; |
38 | 38 | } |
39 | 39 | |
40 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
40 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
41 | 41 | { |
42 | 42 | $auth = $container->get('AuthenticationService'); |
43 | 43 | $user = $auth->getUser(); |
@@ -55,8 +55,8 @@ |
||
55 | 55 | { |
56 | 56 | /* @var $options \Applications\Options\ModuleOptions */ |
57 | 57 | $form->get($this->fileName)->setViewHelper('formImageUpload') |
58 | - ->setMaxSize($options->getContactImageMaxSize()) |
|
59 | - ->setAllowedTypes($options->getContactImageMimeType()) |
|
60 | - ->setForm($form); |
|
58 | + ->setMaxSize($options->getContactImageMaxSize()) |
|
59 | + ->setAllowedTypes($options->getContactImageMimeType()) |
|
60 | + ->setForm($form); |
|
61 | 61 | } |
62 | 62 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | 'info' => array( |
63 | 63 | 'type' => 'Auth/UserInfo', |
64 | 64 | 'property' => true, |
65 | - 'use_post_array' => true |
|
65 | + 'use_post_array' => true |
|
66 | 66 | ), |
67 | 67 | 'image' => array( |
68 | 68 | 'type' => 'Auth/UserImage', |
@@ -56,6 +56,6 @@ |
||
56 | 56 | $form = new static(); |
57 | 57 | $form->forms = $forms->get('FormElementManager'); |
58 | 58 | |
59 | - return $form; |
|
59 | + return $form; |
|
60 | 60 | } |
61 | 61 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function setBirthDay($birthDay) |
140 | 140 | { |
141 | - $this->birthDay=$birthDay; |
|
141 | + $this->birthDay = $birthDay; |
|
142 | 142 | return $this; |
143 | 143 | } |
144 | 144 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | public function setBirthMonth($birthMonth) |
161 | 161 | { |
162 | - $this->birthMonth=$birthMonth; |
|
162 | + $this->birthMonth = $birthMonth; |
|
163 | 163 | return $this; |
164 | 164 | } |
165 | 165 | |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | */ |
181 | 181 | public function setBirthYear($birthYear) |
182 | 182 | { |
183 | - $this->birthYear=$birthYear; |
|
183 | + $this->birthYear = $birthYear; |
|
184 | 184 | return $this; |
185 | 185 | } |
186 | 186 | |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | */ |
202 | 202 | public function setEmail($email) |
203 | 203 | { |
204 | - $this->email = trim((String)$email); |
|
204 | + $this->email = trim((String) $email); |
|
205 | 205 | return $this; |
206 | 206 | } |
207 | 207 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | */ |
245 | 245 | public function setFirstName($firstName) |
246 | 246 | { |
247 | - $this->firstName = trim((String)$firstName); |
|
247 | + $this->firstName = trim((String) $firstName); |
|
248 | 248 | return $this; |
249 | 249 | } |
250 | 250 | |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | */ |
267 | 267 | public function setGender($gender) |
268 | 268 | { |
269 | - $this->gender = trim((String)$gender); |
|
269 | + $this->gender = trim((String) $gender); |
|
270 | 270 | return $this; |
271 | 271 | } |
272 | 272 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | */ |
288 | 288 | public function setHouseNumber($houseNumber) |
289 | 289 | { |
290 | - $this->houseNumber=$houseNumber; |
|
290 | + $this->houseNumber = $houseNumber; |
|
291 | 291 | return $this; |
292 | 292 | } |
293 | 293 | |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | if (!$this->lastName) { |
333 | 333 | return $emailIfEmpty ? $this->email : ''; |
334 | 334 | } |
335 | - return ($this->firstName ? $this->firstName . ' ' : '') . $this->lastName; |
|
335 | + return ($this->firstName ? $this->firstName.' ' : '').$this->lastName; |
|
336 | 336 | } |
337 | 337 | |
338 | 338 | /** |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | */ |
427 | 427 | public function setStreet($street) |
428 | 428 | { |
429 | - $this->street=$street; |
|
429 | + $this->street = $street; |
|
430 | 430 | return $this; |
431 | 431 | } |
432 | 432 | |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | */ |
448 | 448 | public function setCountry($country) |
449 | 449 | { |
450 | - $this->country=$country; |
|
450 | + $this->country = $country; |
|
451 | 451 | return $this; |
452 | 452 | } |
453 | 453 |
@@ -138,14 +138,14 @@ |
||
138 | 138 | if (!$this->test($resource, $privilege)) { |
139 | 139 | $msg = null === $privilege |
140 | 140 | ? sprintf( |
141 | - 'You are not allowed to access resource "%s"', |
|
142 | - is_object($resource) ? $resource->getResourceId() : $resource |
|
143 | - ) |
|
141 | + 'You are not allowed to access resource "%s"', |
|
142 | + is_object($resource) ? $resource->getResourceId() : $resource |
|
143 | + ) |
|
144 | 144 | : sprintf( |
145 | - 'You are not allowed to execute operation "%s" on resource "%s"', |
|
146 | - $privilege, |
|
147 | - is_object($resource) ? $resource->getResourceId() : $resource |
|
148 | - ); |
|
145 | + 'You are not allowed to execute operation "%s" on resource "%s"', |
|
146 | + $privilege, |
|
147 | + is_object($resource) ? $resource->getResourceId() : $resource |
|
148 | + ); |
|
149 | 149 | |
150 | 150 | if ($resource instanceof FileInterface && 0 == strpos($resource->getType(), 'image/')) { |
151 | 151 | throw new UnauthorizedImageAccessException(str_replace('resource', 'image', $msg)); |
@@ -80,9 +80,9 @@ |
||
80 | 80 | $repo->setEntityPrototype(new User()); |
81 | 81 | |
82 | 82 | $result = true; |
83 | - try{ |
|
83 | + try { |
|
84 | 84 | $repo->store($user); |
85 | - }catch (\Exception $e){ |
|
85 | + } catch (\Exception $e) { |
|
86 | 86 | throw $e; |
87 | 87 | } |
88 | 88 | return $result; |
@@ -82,7 +82,7 @@ |
||
82 | 82 | $result = true; |
83 | 83 | try{ |
84 | 84 | $repo->store($user); |
85 | - }catch (\Exception $e){ |
|
85 | + } catch (\Exception $e){ |
|
86 | 86 | throw $e; |
87 | 87 | } |
88 | 88 | return $result; |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | |
51 | 51 | $config = $container->get('doctrine.documentmanager.odm_default')->getConfiguration(); |
52 | 52 | $config->setDefaultDB($database); |
53 | - $dm = $this->createDocumentManager($options['connection'],$config); |
|
53 | + $dm = $this->createDocumentManager($options['connection'], $config); |
|
54 | 54 | |
55 | - $plugin = new UserCreator($credentialFilter,$dm); |
|
55 | + $plugin = new UserCreator($credentialFilter, $dm); |
|
56 | 56 | return $plugin; |
57 | 57 | } |
58 | 58 | |
@@ -64,10 +64,10 @@ discard block |
||
64 | 64 | * @return DocumentManager |
65 | 65 | * @codeCoverageIgnore |
66 | 66 | */ |
67 | - public function createDocumentManager($connection,$config) |
|
67 | + public function createDocumentManager($connection, $config) |
|
68 | 68 | { |
69 | 69 | $dbConn = new Connection($connection); |
70 | - $dm = DocumentManager::create($dbConn,$config); |
|
70 | + $dm = DocumentManager::create($dbConn, $config); |
|
71 | 71 | return $dm; |
72 | 72 | } |
73 | 73 | } |
@@ -17,8 +17,8 @@ |
||
17 | 17 | } else { |
18 | 18 | echo '<p>Could not initialize autoloading. This happens, if the dependencies are not installed yet.</p>'; |
19 | 19 | echo '<p>Please try to install the dependencies via: </p>'; |
20 | - echo '<code>cd '. realpath('.') .'<br>./install.sh</code>'; |
|
21 | - echo '<p>exit at ' . __FILE__ . ' in line ' . __LINE__ .'</p>'; |
|
20 | + echo '<code>cd '.realpath('.').'<br>./install.sh</code>'; |
|
21 | + echo '<p>exit at '.__FILE__.' in line '.__LINE__.'</p>'; |
|
22 | 22 | exit; |
23 | 23 | } |
24 | 24 |