@@ -194,7 +194,7 @@ |
||
194 | 194 | $qb->addOr($qb->expr()->field('info.email')->equals($regex)); |
195 | 195 | } |
196 | 196 | $qb->sort(array('info.lastName' => 1)) |
197 | - ->sort(array('info.email' => 1)); |
|
197 | + ->sort(array('info.email' => 1)); |
|
198 | 198 | |
199 | 199 | return $qb->getQuery()->execute(); |
200 | 200 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * @throws Mapping\MappingException |
53 | 53 | * @throws LockException |
54 | 54 | * @throws UserDeactivatedException |
55 | - * @return null | UserInterface |
|
55 | + * @return null|UserInterface | UserInterface |
|
56 | 56 | */ |
57 | 57 | public function find($id, $lockMode = \Doctrine\ODM\MongoDB\LockMode::NONE, $lockVersion = null, array $options = []) |
58 | 58 | { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * @param array $criteria |
64 | 64 | * @param array $options |
65 | 65 | * @throws UserDeactivatedException |
66 | - * @return null | UserInterface |
|
66 | + * @return null|UserInterface | UserInterface |
|
67 | 67 | */ |
68 | 68 | public function findOneBy(array $criteria, array $options = []) |
69 | 69 | { |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * Creates a User |
93 | 93 | * |
94 | 94 | * @see \Core\Repository\AbstractRepository::create() |
95 | - * @return UserInterface |
|
95 | + * @return \Core\Entity\EntityInterface |
|
96 | 96 | */ |
97 | 97 | public function create(array $data = null, $persist=false) |
98 | 98 | { |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | * @param UserInterface $user |
268 | 268 | * @param array $options |
269 | 269 | * @throws UserDeactivatedException |
270 | - * @return null | UserInterface |
|
270 | + * @return null|UserInterface | UserInterface |
|
271 | 271 | */ |
272 | 272 | protected function assertEntity(UserInterface $user = null, array $options) |
273 | 273 | { |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | * @see \Core\Repository\AbstractRepository::create() |
95 | 95 | * @return UserInterface |
96 | 96 | */ |
97 | - public function create(array $data = null, $persist=false) |
|
97 | + public function create(array $data = null, $persist = false) |
|
98 | 98 | { |
99 | 99 | $entity = parent::create($data); |
100 | 100 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function findByProfileIdentifier($identifier, $provider, array $options = []) |
118 | 118 | { |
119 | - return $this->findOneBy(array('profiles.' . $provider . '.auth.identifier' => $identifier), $options) ?: $this->findOneBy(array('profile.identifier' => $identifier), $options); |
|
119 | + return $this->findOneBy(array('profiles.'.$provider.'.auth.identifier' => $identifier), $options) ?: $this->findOneBy(array('profile.identifier' => $identifier), $options); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | /** |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $qb->field('_id')->notEqual($curentUserId) |
134 | 134 | ->addAnd( |
135 | 135 | $qb->expr() |
136 | - ->addOr($qb->expr()->field('profiles.' . $provider . '.auth.identifier' )->equals($identifier)) |
|
136 | + ->addOr($qb->expr()->field('profiles.'.$provider.'.auth.identifier')->equals($identifier)) |
|
137 | 137 | ->addOr($qb->expr()->field('profile.identifier')->equals($identifier)) |
138 | 138 | ); |
139 | 139 | |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | return $this->findOneBy( |
190 | 190 | array( |
191 | 191 | '$or' => array( |
192 | - array('login' => $identity . $suffix), |
|
192 | + array('login' => $identity.$suffix), |
|
193 | 193 | array('info.email' => $identity) |
194 | 194 | ) |
195 | 195 | ) |
@@ -238,10 +238,10 @@ discard block |
||
238 | 238 | public function findByQuery($query) |
239 | 239 | { |
240 | 240 | $qb = $this->createQueryBuilder(); |
241 | - $parts = explode(' ', trim($query)); |
|
241 | + $parts = explode(' ', trim($query)); |
|
242 | 242 | |
243 | 243 | foreach ($parts as $q) { |
244 | - $regex = new \MongoRegex('/^' . $query . '/i'); |
|
244 | + $regex = new \MongoRegex('/^'.$query.'/i'); |
|
245 | 245 | $qb->addOr($qb->expr()->field('info.firstName')->equals($regex)); |
246 | 246 | $qb->addOr($qb->expr()->field('info.lastName')->equals($regex)); |
247 | 247 | $qb->addOr($qb->expr()->field('info.email')->equals($regex)); |
@@ -70,7 +70,7 @@ |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
73 | - * @return bool |
|
73 | + * @return string |
|
74 | 74 | */ |
75 | 75 | public function getMode() |
76 | 76 | { |
@@ -40,9 +40,9 @@ |
||
40 | 40 | * @var array |
41 | 41 | */ |
42 | 42 | protected $reCaptcha = [ |
43 | - 'site_key' => 'Your Recapture Public Key', // "site_key" |
|
44 | - 'secret_key' => 'Your Recapture Private Key', // "secret_key" |
|
45 | - 'ssl' => true, // include google api via http(s) |
|
43 | + 'site_key' => 'Your Recapture Public Key', // "site_key" |
|
44 | + 'secret_key' => 'Your Recapture Private Key', // "secret_key" |
|
45 | + 'ssl' => true, // include google api via http(s) |
|
46 | 46 | ]; |
47 | 47 | |
48 | 48 | /** |
@@ -121,7 +121,7 @@ |
||
121 | 121 | 'attributes' => [ |
122 | 122 | 'data-placeholder' => /*@translate*/ 'please select', |
123 | 123 | 'data-allowclear' => 'false', |
124 | - 'data-searchbox' => -1, // hide the search box |
|
124 | + 'data-searchbox' => -1, // hide the search box |
|
125 | 125 | 'required' => true, // mark label as required |
126 | 126 | ], |
127 | 127 | ) |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * Gets the Day of the date of birth |
31 | 31 | * |
32 | 32 | * @return string |
33 | - */ |
|
33 | + */ |
|
34 | 34 | public function getBirthDay(); |
35 | 35 | |
36 | 36 | /** |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * Gets the month of the date of birth |
45 | 45 | * |
46 | 46 | * @return string |
47 | - */ |
|
47 | + */ |
|
48 | 48 | public function getBirthMonth(); |
49 | 49 | |
50 | 50 | /** |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * Gets the Year of the date of birth. |
59 | 59 | * |
60 | 60 | * @return string |
61 | - */ |
|
61 | + */ |
|
62 | 62 | public function getBirthYear(); |
63 | 63 | |
64 | 64 | /** |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * Gets the gender |
112 | 112 | * |
113 | 113 | * @return string |
114 | - */ |
|
114 | + */ |
|
115 | 115 | public function getGender(); |
116 | 116 | |
117 | 117 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * Gets the users street |
155 | 155 | * |
156 | 156 | * @return string |
157 | - */ |
|
157 | + */ |
|
158 | 158 | public function getStreet(); |
159 | 159 | |
160 | 160 | /** |
@@ -23,6 +23,7 @@ discard block |
||
23 | 23 | * Sets the Day of the date of birth. |
24 | 24 | * |
25 | 25 | * @param string $birthDay |
26 | + * @return Info |
|
26 | 27 | */ |
27 | 28 | public function setBirthDay($birthDay); |
28 | 29 | |
@@ -37,6 +38,7 @@ discard block |
||
37 | 38 | * Sets the month of the date of birth. |
38 | 39 | * |
39 | 40 | * @param string $birthMonth |
41 | + * @return Info |
|
40 | 42 | */ |
41 | 43 | public function setBirthMonth($birthMonth); |
42 | 44 | |
@@ -51,6 +53,7 @@ discard block |
||
51 | 53 | * Sets the year of the date of birth. |
52 | 54 | * |
53 | 55 | * @param string $email |
56 | + * @return Info |
|
54 | 57 | */ |
55 | 58 | public function setBirthYear($email); |
56 | 59 | |
@@ -65,6 +68,7 @@ discard block |
||
65 | 68 | * Sets the email. |
66 | 69 | * |
67 | 70 | * @param string $email |
71 | + * @return Info |
|
68 | 72 | */ |
69 | 73 | public function setEmail($email); |
70 | 74 | |
@@ -90,6 +94,7 @@ discard block |
||
90 | 94 | * Sets the first name |
91 | 95 | * |
92 | 96 | * @param string $name |
97 | + * @return Info |
|
93 | 98 | */ |
94 | 99 | public function setFirstName($name); |
95 | 100 | |
@@ -104,6 +109,7 @@ discard block |
||
104 | 109 | * Sets the gender |
105 | 110 | * |
106 | 111 | * @param string $gender |
112 | + * @return Info |
|
107 | 113 | */ |
108 | 114 | public function setGender($gender); |
109 | 115 | |
@@ -119,6 +125,7 @@ discard block |
||
119 | 125 | * Sets the last name |
120 | 126 | * |
121 | 127 | * @param string $name |
128 | + * @return Info |
|
122 | 129 | */ |
123 | 130 | public function setLastName($name); |
124 | 131 | |
@@ -133,6 +140,7 @@ discard block |
||
133 | 140 | * Sets the profile Image of an user |
134 | 141 | * |
135 | 142 | * @param EntityInterface $image |
143 | + * @return Info |
|
136 | 144 | */ |
137 | 145 | public function setImage(EntityInterface $image = null); |
138 | 146 | |
@@ -147,6 +155,7 @@ discard block |
||
147 | 155 | * Sets the users street |
148 | 156 | * |
149 | 157 | * @param string $name |
158 | + * @return Info |
|
150 | 159 | */ |
151 | 160 | public function setStreet($name); |
152 | 161 | |
@@ -161,6 +170,7 @@ discard block |
||
161 | 170 | * Sets the users house number |
162 | 171 | * |
163 | 172 | * @param string $houseNumber |
173 | + * @return Info |
|
164 | 174 | */ |
165 | 175 | public function setHouseNumber($houseNumber); |
166 | 176 | |
@@ -186,6 +196,7 @@ discard block |
||
186 | 196 | * |
187 | 197 | * @param string $postalCode |
188 | 198 | * @since 0.20 |
199 | + * @return Info |
|
189 | 200 | */ |
190 | 201 | public function setPostalCode($postalCode); |
191 | 202 | |
@@ -202,6 +213,7 @@ discard block |
||
202 | 213 | * |
203 | 214 | * @param string $phone |
204 | 215 | * @since 0.20 |
216 | + * @return Info |
|
205 | 217 | */ |
206 | 218 | public function setPhone($phone); |
207 | 219 | |
@@ -218,6 +230,7 @@ discard block |
||
218 | 230 | * |
219 | 231 | * @param string $city |
220 | 232 | * @since 0.20 |
233 | + * @return Info |
|
221 | 234 | */ |
222 | 235 | public function setCity($city); |
223 | 236 | |
@@ -234,6 +247,7 @@ discard block |
||
234 | 247 | * |
235 | 248 | * @param string $country |
236 | 249 | * @since 0.30 |
250 | + * @return Info |
|
237 | 251 | */ |
238 | 252 | public function setCountry($country); |
239 | 253 |
@@ -64,7 +64,7 @@ |
||
64 | 64 | |
65 | 65 | $this->add($fieldset); |
66 | 66 | |
67 | - $mode=$options->getMode(); |
|
67 | + $mode = $options->getMode(); |
|
68 | 68 | if (in_array($mode, [CaptchaOptions::RE_CAPTCHA, CaptchaOptions::IMAGE])) { |
69 | 69 | if ($mode == CaptchaOptions::IMAGE) { |
70 | 70 | $captcha = new Image($options->getImage()); |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | public function init() |
29 | 29 | { |
30 | 30 | $this->setName('data') |
31 | - ->setLabel('Group data') |
|
32 | - ->setUseAsBaseFieldset(true) |
|
33 | - ->setHydrator(new EntityHydrator()); |
|
31 | + ->setLabel('Group data') |
|
32 | + ->setUseAsBaseFieldset(true) |
|
33 | + ->setHydrator(new EntityHydrator()); |
|
34 | 34 | |
35 | 35 | $this->add( |
36 | 36 | array( |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | 'required' => true, |
70 | 70 | 'validators' => array( |
71 | 71 | array('name' => 'Auth/Form/UniqueGroupName', |
72 | - 'options' => array( |
|
72 | + 'options' => array( |
|
73 | 73 | 'allowName' => 'edit' == $this->getOption('mode') |
74 | 74 | ? $this->getObject()->getName() |
75 | 75 | : null |
@@ -20,7 +20,7 @@ |
||
20 | 20 | { |
21 | 21 | |
22 | 22 | protected $sortPropertiesMap = [ |
23 | - 'name' => [ 'info.lastName', 'info.firstName', 'info.email' ], |
|
23 | + 'name' => ['info.lastName', 'info.firstName', 'info.email'], |
|
24 | 24 | ]; |
25 | 25 | |
26 | 26 | /** |
@@ -29,7 +29,7 @@ |
||
29 | 29 | */ |
30 | 30 | public function getUri() |
31 | 31 | { |
32 | - return '/file/Auth.UserImage/' . $this->id; |
|
32 | + return '/file/Auth.UserImage/'.$this->id; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
@@ -9,7 +9,7 @@ |
||
9 | 9 | |
10 | 10 | public function filter($value) |
11 | 11 | { |
12 | - $weird = sha1(md5($value) . md5(strrev($value))); |
|
12 | + $weird = sha1(md5($value).md5(strrev($value))); |
|
13 | 13 | return $weird; |
14 | 14 | } |
15 | 15 | } |