@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | */ |
234 | 234 | public function getParent($returnSelf = false) |
235 | 235 | { |
236 | - return $this->parent ? : ($returnSelf ? $this : null); |
|
236 | + return $this->parent ?: ($returnSelf ? $this : null); |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | /** |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | */ |
466 | 466 | public function getPermissionsResourceId() |
467 | 467 | { |
468 | - return 'organization:' . $this->getId(); |
|
468 | + return 'organization:'.$this->getId(); |
|
469 | 469 | } |
470 | 470 | |
471 | 471 | /** |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | class ConsoleController extends AbstractActionController |
26 | 26 | { |
27 | - const EVENT_UPDATE_INDEX = 'solr.console.update_index'; |
|
27 | + const EVENT_UPDATE_INDEX = 'solr.console.update_index'; |
|
28 | 28 | |
29 | 29 | public function activeJobIndexAction() |
30 | 30 | { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | $progressBar = new ProgressBar($count); |
44 | 44 | $i = 1; |
45 | - foreach($jobs as $job){ |
|
45 | + foreach ($jobs as $job) { |
|
46 | 46 | /* @var Job $job */ |
47 | 47 | $jobSubscriber->consoleIndex($job); |
48 | 48 | $progressBar->update($i, 'Job '.$i.' / '.$count); |
@@ -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 | { |
@@ -109,8 +109,7 @@ |
||
109 | 109 | if ('file-uri' === $params->fromPost('return')) { |
110 | 110 | $content = $viewHelperManager->get('basepath') |
111 | 111 | ->__invoke($form->getHydrator()->getLastUploadedFile()->getUri()); |
112 | - } |
|
113 | - else { |
|
112 | + } else { |
|
114 | 113 | if ($form instanceof SummaryFormInterface) { |
115 | 114 | $form->setRenderMode(SummaryFormInterface::RENDER_SUMMARY); |
116 | 115 | $viewHelper = 'summaryform'; |
@@ -173,6 +173,9 @@ |
||
173 | 173 | return $this->redirect()->refresh(); |
174 | 174 | } |
175 | 175 | |
176 | + /** |
|
177 | + * @param \Cv\Repository\Cv $repository |
|
178 | + */ |
|
176 | 179 | private function getCv($repository, $user) |
177 | 180 | { |
178 | 181 | $id = |
@@ -73,14 +73,14 @@ |
||
73 | 73 | $count = $options->getAttachmentsCount(); |
74 | 74 | |
75 | 75 | $form->setIsDisableCapable(false) |
76 | - ->setIsDisableElementsCapable(false) |
|
77 | - ->setIsDescriptionsEnabled(true) |
|
78 | - ->setDescription( |
|
76 | + ->setIsDisableElementsCapable(false) |
|
77 | + ->setIsDescriptionsEnabled(true) |
|
78 | + ->setDescription( |
|
79 | 79 | /*@translate*/ 'Attach images or PDF Documents to your application. Drag&drop them, or click into the attachement area. You can upload up to %sMB', |
80 | - [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)] |
|
81 | - ) |
|
82 | - ->setParam('return', 'file-uri') |
|
83 | - ->setLabel(/*@translate*/ 'Attachments'); |
|
80 | + [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)] |
|
81 | + ) |
|
82 | + ->setParam('return', 'file-uri') |
|
83 | + ->setLabel(/*@translate*/ 'Attachments'); |
|
84 | 84 | |
85 | 85 | /** @var $file FileUpload*/ |
86 | 86 | $file = $form->get($this->fileName); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * |
53 | 53 | * @var string |
54 | 54 | */ |
55 | - protected $options="Cv/Options"; |
|
55 | + protected $options = "Cv/Options"; |
|
56 | 56 | |
57 | 57 | |
58 | 58 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | ->setIsDescriptionsEnabled(true) |
78 | 78 | ->setDescription( |
79 | 79 | /*@translate*/ 'Attach images or PDF Documents to your CV. Drag&drop them, or click into the attachement area. You can upload up to %sMB', |
80 | - [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)] |
|
80 | + [round($size / (1024 * 1024)) > 0 ? round($size / (1024 * 1024)) : round($size / (1024 * 1024), 1)] |
|
81 | 81 | ) |
82 | 82 | ->setParam('return', 'file-uri') |
83 | 83 | ->setLabel(/*@translate*/ 'Attachments'); |
@@ -41,8 +41,8 @@ |
||
41 | 41 | $fileId = new \MongoId($file->id); |
42 | 42 | $dm = $eventArgs->getDocumentManager(); |
43 | 43 | $dm->createQueryBuilder('Cv\Entity\Cv') |
44 | - ->update()->multiple(true) |
|
45 | - ->field('attachments')->equals($fileId)->pull($fileId) |
|
46 | - ->getQuery()->execute(); |
|
44 | + ->update()->multiple(true) |
|
45 | + ->field('attachments')->equals($fileId)->pull($fileId) |
|
46 | + ->getQuery()->execute(); |
|
47 | 47 | } |
48 | 48 | } |
@@ -31,6 +31,6 @@ |
||
31 | 31 | */ |
32 | 32 | public function getUri() |
33 | 33 | { |
34 | - return "/file/Cv.Attachment/" . $this->id . "/" .urlencode($this->name); |
|
34 | + return "/file/Cv.Attachment/".$this->id."/".urlencode($this->name); |
|
35 | 35 | } |
36 | 36 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * Look for an drafted Document of a given user |
23 | 23 | * |
24 | 24 | * @param $user |
25 | - * @return CvEntity|null |
|
25 | + * @return \MongoCursor |
|
26 | 26 | */ |
27 | 27 | public function findDraft($user) |
28 | 28 | { |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $resume = $this->repository->find($id); |
42 | 42 | |
43 | 43 | if (!$resume) { |
44 | - throw new \Exception('No resume found with id ' . $id); |
|
44 | + throw new \Exception('No resume found with id '.$id); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /* @todo REMOVE THIS |