@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | public function init() |
13 | 13 | { |
14 | - // $this->setDescription(/*@translate*/' Where do you want to work tomorrow. This heading gives an immediate overview of your desired next job.'); |
|
14 | + // $this->setDescription(/*@translate*/' Where do you want to work tomorrow. This heading gives an immediate overview of your desired next job.'); |
|
15 | 15 | $this->setIsDescriptionsEnabled(true); |
16 | 16 | parent::init(); |
17 | 17 | } |
@@ -124,9 +124,9 @@ |
||
124 | 124 | public function init() |
125 | 125 | { |
126 | 126 | $this->setName('nativeLanguages') |
127 | - ->setHydrator(new EntityHydrator()) |
|
128 | - ->setObject(new NativeLanguageEntity()) |
|
129 | - ->setLabel('Native Language'); |
|
127 | + ->setHydrator(new EntityHydrator()) |
|
128 | + ->setObject(new NativeLanguageEntity()) |
|
129 | + ->setLabel('Native Language'); |
|
130 | 130 | |
131 | 131 | |
132 | 132 | $this->add( |
@@ -60,11 +60,11 @@ |
||
60 | 60 | protected $skills; |
61 | 61 | |
62 | 62 | /** |
63 | - * Skills |
|
64 | - * |
|
65 | - * @var ArrayCollection |
|
66 | - * @ODM\EmbedMany(targetDocument="\Cv\Entity\Language") |
|
67 | - */ |
|
63 | + * Skills |
|
64 | + * |
|
65 | + * @var ArrayCollection |
|
66 | + * @ODM\EmbedMany(targetDocument="\Cv\Entity\Language") |
|
67 | + */ |
|
68 | 68 | protected $languageSkills; |
69 | 69 | |
70 | 70 | /** |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | } |
187 | 187 | |
188 | 188 | /** |
189 | - * @return ArrayCollection |
|
189 | + * @return IdentityWrapper |
|
190 | 190 | */ |
191 | 191 | public function getEducationsIndexedById() |
192 | 192 | { |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | |
217 | 217 | /** |
218 | - * @return ArrayCollection |
|
218 | + * @return IdentityWrapper |
|
219 | 219 | */ |
220 | 220 | public function getEmploymentsIndexedById() |
221 | 221 | { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | } |
245 | 245 | |
246 | 246 | /** |
247 | - * @return ArrayCollection |
|
247 | + * @return IdentityWrapper |
|
248 | 248 | */ |
249 | 249 | public function getSkillsIndexedById() |
250 | 250 | { |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | } |
323 | 323 | |
324 | 324 | /** |
325 | - * @return ArrayCollection |
|
325 | + * @return IdentityWrapper |
|
326 | 326 | */ |
327 | 327 | public function getLanguageSkillsIndexedById() |
328 | 328 | { |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | } |
361 | 361 | |
362 | 362 | /** |
363 | - * @param Status|string $status |
|
363 | + * @param string $status |
|
364 | 364 | */ |
365 | 365 | public function setStatus($status) |
366 | 366 | { |
@@ -407,6 +407,9 @@ discard block |
||
407 | 407 | } |
408 | 408 | } |
409 | 409 | |
410 | + /** |
|
411 | + * @param UserInterface $oldUser |
|
412 | + */ |
|
410 | 413 | private function updatePermissions($oldUser = null) |
411 | 414 | { |
412 | 415 | $hasPermissions = (bool) $this->permissions; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @var array |
83 | 83 | * @ODM\Field(type="collection") |
84 | 84 | */ |
85 | - protected $nativeLanguages=[]; |
|
85 | + protected $nativeLanguages = []; |
|
86 | 86 | |
87 | 87 | |
88 | 88 | /** |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | */ |
268 | 268 | public function setIsDraft($isDraft) |
269 | 269 | { |
270 | - $this->isDraft=$isDraft; |
|
270 | + $this->isDraft = $isDraft; |
|
271 | 271 | return $this; |
272 | 272 | } |
273 | 273 | |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | */ |
338 | 338 | public function setNativeLanguages($nativeLanguages) |
339 | 339 | { |
340 | - $this->nativeLanguages=$nativeLanguages; |
|
340 | + $this->nativeLanguages = $nativeLanguages; |
|
341 | 341 | return $this; |
342 | 342 | } |
343 | 343 |
@@ -11,9 +11,9 @@ |
||
11 | 11 | public function init() |
12 | 12 | { |
13 | 13 | $this->setName('language') |
14 | - ->setHydrator(new EntityHydrator()) |
|
15 | - ->setObject(new LanguageEntity()) |
|
16 | - ->setLabel('Language'); |
|
14 | + ->setHydrator(new EntityHydrator()) |
|
15 | + ->setObject(new LanguageEntity()) |
|
16 | + ->setLabel('Language'); |
|
17 | 17 | |
18 | 18 | $this->add( |
19 | 19 | array( |
@@ -47,7 +47,7 @@ |
||
47 | 47 | public function __construct($status = self::NONPUBLIC) |
48 | 48 | { |
49 | 49 | if (!isset(static::$orderMap[$status])) { |
50 | - throw new \DomainException('Unknown status: ' . $status); |
|
50 | + throw new \DomainException('Unknown status: '.$status); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | $this->name = $status; |
@@ -16,9 +16,9 @@ |
||
16 | 16 | interface StatusInterface extends EntityInterface |
17 | 17 | { |
18 | 18 | |
19 | - const NONPUBLIC = /*@translate*/ 'private'; |
|
19 | + const NONPUBLIC = /*@translate*/ 'private'; |
|
20 | 20 | |
21 | - const PUBLIC_TO_ALL = /*@translate*/ 'public to all'; |
|
21 | + const PUBLIC_TO_ALL = /*@translate*/ 'public to all'; |
|
22 | 22 | |
23 | 23 | public function __construct($status = self::NONPUBLIC); |
24 | 24 |
@@ -125,16 +125,16 @@ |
||
125 | 125 | |
126 | 126 | public function setParams($params) |
127 | 127 | { |
128 | - if(is_array($params)){ |
|
129 | - if(isset($params['paginatorParams'])){ |
|
128 | + if (is_array($params)) { |
|
129 | + if (isset($params['paginatorParams'])) { |
|
130 | 130 | $this->setPaginatorParams($params['paginatorParams']); |
131 | 131 | unset($params['paginatorParams']); |
132 | 132 | } |
133 | - if(isset($params['paginators'])){ |
|
133 | + if (isset($params['paginators'])) { |
|
134 | 134 | $this->setPaginators($params['paginators']); |
135 | 135 | unset($params['paginators']); |
136 | 136 | } |
137 | - if(isset($params['paginatorName'])){ |
|
137 | + if (isset($params['paginatorName'])) { |
|
138 | 138 | $this->setPaginatorName($params['paginatorName']); |
139 | 139 | unset($params['paginatorName']); |
140 | 140 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | */ |
48 | 48 | protected $paginator; |
49 | 49 | |
50 | - /** |
|
50 | + /** |
|
51 | 51 | * @return string |
52 | 52 | */ |
53 | 53 | public function getPaginatorName() |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | /** |
131 | 131 | * @param $resource |
132 | - * @param null $privilege |
|
132 | + * @param null|string $privilege |
|
133 | 133 | * @throws \Auth\Exception\UnauthorizedImageAccessException |
134 | 134 | * @throws \Auth\Exception\UnauthorizedAccessException |
135 | 135 | */ |
@@ -155,8 +155,8 @@ discard block |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | /** |
158 | - * @param null $resource |
|
159 | - * @param null $privilege |
|
158 | + * @param null|string $resource |
|
159 | + * @param null|string $privilege |
|
160 | 160 | * @param string $mode |
161 | 161 | * @return $this|bool |
162 | 162 | */ |
@@ -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)); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | * |
35 | 35 | * @var array $attachmentsMimeType |
36 | 36 | */ |
37 | - protected $attachmentsMimeType = array('image','applications/pdf', |
|
37 | + protected $attachmentsMimeType = array('image', 'applications/pdf', |
|
38 | 38 | 'application/x-pdf', |
39 | 39 | 'application/acrobat', |
40 | 40 | 'applications/vnd.pdf', |
@@ -93,7 +93,7 @@ |
||
93 | 93 | /** |
94 | 94 | * Gets the the maximum number of allowed attachments |
95 | 95 | * |
96 | - * @return string |
|
96 | + * @return integer |
|
97 | 97 | */ |
98 | 98 | public function getAttachmentsCount() |
99 | 99 | { |