@@ -404,7 +404,7 @@ |
||
404 | 404 | /** |
405 | 405 | * {@inheritDoc} |
406 | 406 | * @see \Applications\Entity\ApplicationInterface::getSummary() |
407 | - * @return Application |
|
407 | + * @return string |
|
408 | 408 | */ |
409 | 409 | public function getSummary() |
410 | 410 | { |
@@ -446,7 +446,7 @@ |
||
446 | 446 | public function getCv() |
447 | 447 | { |
448 | 448 | if (is_null($this->cv)) { |
449 | - $this->cv= new Cv(); |
|
449 | + $this->cv = new Cv(); |
|
450 | 450 | } |
451 | 451 | return $this->cv; |
452 | 452 | } |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | /** |
241 | 241 | * Gets all comments for the application. |
242 | 242 | * |
243 | - * @return ArrayCollection; |
|
243 | + * @return Collection |
|
244 | 244 | |
245 | 245 | */ |
246 | 246 | public function getComments(); |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | /** |
272 | 272 | * Gets all attributes for an application. |
273 | 273 | * |
274 | - * @return ArrayCollection; |
|
274 | + * @return Attributes |
|
275 | 275 | |
276 | 276 | */ |
277 | 277 | public function getAttributes(); |
@@ -241,7 +241,6 @@ discard block |
||
241 | 241 | * Gets all comments for the application. |
242 | 242 | * |
243 | 243 | * @return ArrayCollection; |
244 | - |
|
245 | 244 | */ |
246 | 245 | public function getComments(); |
247 | 246 | |
@@ -272,7 +271,6 @@ discard block |
||
272 | 271 | * Gets all attributes for an application. |
273 | 272 | * |
274 | 273 | * @return ArrayCollection; |
275 | - |
|
276 | 274 | */ |
277 | 275 | public function getAttributes(); |
278 | 276 |
@@ -41,6 +41,9 @@ discard block |
||
41 | 41 | */ |
42 | 42 | protected $message; |
43 | 43 | |
44 | + /** |
|
45 | + * @param StatusInterface|null $status |
|
46 | + */ |
|
44 | 47 | public function __construct($status, $message = '[System]') |
45 | 48 | { |
46 | 49 | if (!$status instanceof StatusInterface) { |
@@ -116,7 +119,7 @@ discard block |
||
116 | 119 | /** |
117 | 120 | * Sets the history message |
118 | 121 | * |
119 | - * @param $message |
|
122 | + * @param string $message |
|
120 | 123 | * |
121 | 124 | * @return $this |
122 | 125 | */ |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |
171 | - * @return mixed |
|
171 | + * @return string |
|
172 | 172 | */ |
173 | 173 | public function getStatus() |
174 | 174 | { |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
179 | - * @return mixed |
|
179 | + * @return boolean |
|
180 | 180 | */ |
181 | 181 | public function isPostRequest() |
182 | 182 | { |
@@ -28,17 +28,17 @@ |
||
28 | 28 | /** |
29 | 29 | * Event is fired when a new application is saved. |
30 | 30 | */ |
31 | - const EVENT_APPLICATION_POST_CREATE = 'application.post.create'; |
|
31 | + const EVENT_APPLICATION_POST_CREATE = 'application.post.create'; |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * Event is fired when a users deleted application |
35 | 35 | */ |
36 | - const EVENT_APPLICATION_PRE_DELETE = 'application.pre.delete'; |
|
36 | + const EVENT_APPLICATION_PRE_DELETE = 'application.pre.delete'; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * Event is fired when the status of an application is changed |
40 | 40 | */ |
41 | - const EVENT_APPLICATION_STATUS_CHANGE = 'application.status.change'; |
|
41 | + const EVENT_APPLICATION_STATUS_CHANGE = 'application.status.change'; |
|
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @var Application $application |
@@ -103,7 +103,7 @@ |
||
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
106 | - * @return mixed |
|
106 | + * @return string |
|
107 | 107 | */ |
108 | 108 | protected function getJobTitle() |
109 | 109 | { |
@@ -174,11 +174,11 @@ |
||
174 | 174 | return ''; |
175 | 175 | } |
176 | 176 | |
177 | - $token = $user instanceof AnonymousUser ? '?token=' . $user->getToken() : ''; |
|
177 | + $token = $user instanceof AnonymousUser ? '?token='.$user->getToken() : ''; |
|
178 | 178 | $href = $router->assemble( |
179 | 179 | ['id' => $this->application->getId()], |
180 | 180 | ['name'=>'lang/applications/detail', 'force_canonical'=>true] |
181 | - ) . $token; |
|
181 | + ).$token; |
|
182 | 182 | |
183 | 183 | return $href; |
184 | 184 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | /** |
122 | 122 | * Gets the the maximum number of allowed attachments |
123 | 123 | * |
124 | - * @return string |
|
124 | + * @return integer |
|
125 | 125 | */ |
126 | 126 | public function getAttachmentsCount() |
127 | 127 | { |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | /** |
143 | 143 | * Gets the the maximum size of contact images in bytes |
144 | 144 | * |
145 | - * @return string |
|
145 | + * @return integer |
|
146 | 146 | */ |
147 | 147 | public function getContactImageMaxSize() |
148 | 148 | { |
@@ -79,7 +79,7 @@ |
||
79 | 79 | |
80 | 80 | protected $workflow = [ |
81 | 81 | |
82 | - 'recruiter', |
|
82 | + 'recruiter', |
|
83 | 83 | ]; |
84 | 84 | |
85 | 85 | /** |
@@ -237,7 +237,7 @@ |
||
237 | 237 | */ |
238 | 238 | public function setAllowSubsequentAttachmentUpload($allowSubsequentAttachmentUpload) |
239 | 239 | { |
240 | - $this->allowSubsequentAttachmentUpload = (bool)$allowSubsequentAttachmentUpload; |
|
240 | + $this->allowSubsequentAttachmentUpload = (bool) $allowSubsequentAttachmentUpload; |
|
241 | 241 | |
242 | 242 | return $this; |
243 | 243 | } |
@@ -35,8 +35,8 @@ |
||
35 | 35 | /** |
36 | 36 | * Updates fiile permissions on Flush |
37 | 37 | * |
38 | - * @param OnFlushEventArgs $eventArgs |
|
39 | - * @return boolean |
|
38 | + * @param LifecycleEventArgs $eventArgs |
|
39 | + * @return boolean|null |
|
40 | 40 | */ |
41 | 41 | public function postRemoveEntity(LifecycleEventArgs $eventArgs) |
42 | 42 | { |
@@ -51,14 +51,14 @@ |
||
51 | 51 | $fileId = new \MongoId($file->id); |
52 | 52 | |
53 | 53 | $dm->createQueryBuilder('Applications\Entity\Application') |
54 | - ->update()->multiple(true) |
|
55 | - ->field('attachments')->equals($fileId)->pull($fileId) |
|
56 | - ->getQuery()->execute(); |
|
54 | + ->update()->multiple(true) |
|
55 | + ->field('attachments')->equals($fileId)->pull($fileId) |
|
56 | + ->getQuery()->execute(); |
|
57 | 57 | |
58 | 58 | |
59 | 59 | $dm->createQueryBuilder('Applications\Entity\Application') |
60 | - ->update()->multiple(true) |
|
61 | - ->field('contact.image')->equals($fileId)->set(null) |
|
62 | - ->getQuery()->execute(); |
|
60 | + ->update()->multiple(true) |
|
61 | + ->field('contact.image')->equals($fileId)->set(null) |
|
62 | + ->getQuery()->execute(); |
|
63 | 63 | } |
64 | 64 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | * Updates fiile permissions on Flush |
36 | 36 | * |
37 | 37 | * @param OnFlushEventArgs $eventArgs |
38 | - * @return boolean |
|
38 | + * @return boolean|null |
|
39 | 39 | */ |
40 | 40 | public function onFlush(OnFlushEventArgs $eventArgs) |
41 | 41 | { |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | |
57 | 57 | foreach ($document->getAttachments() as $attachment) { /* @var \Applications\Entity\Attachment $attachment */ |
58 | 58 | $attachment->getPermissions() |
59 | - ->clear() |
|
60 | - ->inherit($permissions); |
|
59 | + ->clear() |
|
60 | + ->inherit($permissions); |
|
61 | 61 | if ($isUpdate) { |
62 | 62 | $uow->computeChangeSet( |
63 | 63 | $dm->getClassMetadata(get_class($attachment)), |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | |
69 | 69 | if ($image = $document->getContact()->getImage()) { |
70 | 70 | $image->getPermissions() |
71 | - ->clear() |
|
72 | - ->inherit($permissions); |
|
71 | + ->clear() |
|
72 | + ->inherit($permissions); |
|
73 | 73 | if ($isUpdate) { |
74 | 74 | $uow->computeChangeSet( |
75 | 75 | $dm->getClassMetadata(get_class($image)), |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $dm = $eventArgs->getDocumentManager(); |
43 | 43 | $uow = $dm->getUnitOfWork(); |
44 | 44 | |
45 | - $filter = function ($element) { |
|
45 | + $filter = function($element) { |
|
46 | 46 | return $element instanceof ApplicationInterface |
47 | 47 | && $element->getPermissions()->hasChanged(); |
48 | 48 | }; |
@@ -106,7 +106,6 @@ discard block |
||
106 | 106 | |
107 | 107 | /** |
108 | 108 | * @param $name |
109 | - * @param array $params |
|
110 | 109 | * |
111 | 110 | * @return string |
112 | 111 | */ |
@@ -117,6 +116,7 @@ discard block |
||
117 | 116 | |
118 | 117 | /** |
119 | 118 | * @When /^I hover over the element "([^"]*)"$/ |
119 | + * @param string $locator |
|
120 | 120 | */ |
121 | 121 | public function iHoverOverTheElement($locator) |
122 | 122 | { |
@@ -261,10 +261,10 @@ discard block |
||
261 | 261 | } |
262 | 262 | |
263 | 263 | /** |
264 | - * @param $locator |
|
264 | + * @param string $locator |
|
265 | 265 | * @param string $selector |
266 | 266 | * |
267 | - * @return \Behat\Mink\Element\NodeElement|mixed|null |
|
267 | + * @return \Behat\Mink\Element\NodeElement|null |
|
268 | 268 | */ |
269 | 269 | public function getElement($locator, $selector='css') |
270 | 270 | { |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | private $config; |
31 | 31 | |
32 | - public function __construct($config=null) |
|
32 | + public function __construct($config = null) |
|
33 | 33 | { |
34 | 34 | if (is_null($config)) { |
35 | 35 | $config = __DIR__.'/../../../config/config.php'; |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | public function iSetMainWindowName() |
181 | 181 | { |
182 | 182 | $window_name = 'main_window'; |
183 | - $script = 'window.name = "' . $window_name . '"'; |
|
183 | + $script = 'window.name = "'.$window_name.'"'; |
|
184 | 184 | $this->getSession()->executeScript($script); |
185 | 185 | } |
186 | 186 | |
@@ -239,14 +239,14 @@ discard block |
||
239 | 239 | break; |
240 | 240 | |
241 | 241 | default: |
242 | - throw new \Exception(__METHOD__ . ' Couldn\'t find selector: ' . $selector . ' - Allowed selectors: #id, .className, //xpath'); |
|
242 | + throw new \Exception(__METHOD__.' Couldn\'t find selector: '.$selector.' - Allowed selectors: #id, .className, //xpath'); |
|
243 | 243 | break; |
244 | 244 | } |
245 | 245 | |
246 | 246 | try { |
247 | 247 | $this->getSession()->executeScript($function); |
248 | 248 | } catch (\Exception $e) { |
249 | - throw new \Exception(__METHOD__ . ' failed'. ' Message: for this locator:"'.$selector.'"'); |
|
249 | + throw new \Exception(__METHOD__.' failed'.' Message: for this locator:"'.$selector.'"'); |
|
250 | 250 | } |
251 | 251 | } |
252 | 252 | |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | * |
267 | 267 | * @return \Behat\Mink\Element\NodeElement|mixed|null |
268 | 268 | */ |
269 | - public function getElement($locator, $selector='css') |
|
269 | + public function getElement($locator, $selector = 'css') |
|
270 | 270 | { |
271 | 271 | $page = $this->minkContext->getSession()->getPage(); |
272 | 272 | $element = $page->find('css', $locator); |
@@ -300,12 +300,12 @@ discard block |
||
300 | 300 | $session = $this->getSession(); |
301 | 301 | $element = $session->getPage()->find( |
302 | 302 | 'xpath', |
303 | - $session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'. $text .'"]') |
|
303 | + $session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'.$text.'"]') |
|
304 | 304 | ); |
305 | 305 | if (null === $element) { |
306 | 306 | $element = $session->getPage()->find( |
307 | 307 | 'named', |
308 | - array('id',$text) |
|
308 | + array('id', $text) |
|
309 | 309 | ); |
310 | 310 | } |
311 | 311 | if (null === $element) { |