@@ -171,7 +171,7 @@ |
||
| 171 | 171 | * Return all event parameters or a single event parameter. |
| 172 | 172 | * |
| 173 | 173 | * @param string $param Parameter name to retrieve, or null to get all. |
| 174 | - * @param mixed $efault Default value to use when the parameter is missing. |
|
| 174 | + * @param mixed $default Default value to use when the parameter is missing. |
|
| 175 | 175 | * @return mixed |
| 176 | 176 | * @throws RuntimeException |
| 177 | 177 | */ |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | * returns the number of years of the education or work experience |
| 19 | 19 | * |
| 20 | 20 | * @param array $array |
| 21 | - * @return string |
|
| 21 | + * @return double |
|
| 22 | 22 | */ |
| 23 | 23 | public function __invoke($array) |
| 24 | 24 | { |
@@ -25,13 +25,13 @@ |
||
| 25 | 25 | // calculate EndDate - StartDate = X Years. |
| 26 | 26 | // eg. 4.2 Years |
| 27 | 27 | |
| 28 | - $days=0; |
|
| 28 | + $days = 0; |
|
| 29 | 29 | foreach ($array as $obj) { |
| 30 | 30 | $date1 = new \DateTime($obj->getEndDate()); |
| 31 | 31 | $date2 = new \DateTime($obj->getStartDate()); |
| 32 | 32 | $interval = $date1->diff($date2); |
| 33 | - $days+=abs($interval->format('%R%a')); |
|
| 33 | + $days += abs($interval->format('%R%a')); |
|
| 34 | 34 | } |
| 35 | - return round($days/365, 1); |
|
| 35 | + return round($days / 365, 1); |
|
| 36 | 36 | } |
| 37 | 37 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | * - injects the MvcEvent instance |
| 27 | 27 | * |
| 28 | 28 | * @param ServiceLocatorInterface $serviceLocator |
| 29 | - * @return \Core\View\Helper\Params |
|
| 29 | + * @return DateFormat |
|
| 30 | 30 | * @see \Zend\ServiceManager\FactoryInterface::createService() |
| 31 | 31 | */ |
| 32 | 32 | public function createService(ServiceLocatorInterface $serviceLocator) |
@@ -86,7 +86,6 @@ |
||
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /** |
| 89 | - * @param HelperPluginManager $helperPluginManager |
|
| 90 | 89 | * @return Services |
| 91 | 90 | */ |
| 92 | 91 | public static function factory($sm) |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | /** |
| 43 | 43 | * Get required modules for Yawik |
| 44 | 44 | * |
| 45 | - * @return array |
|
| 45 | + * @return string[] |
|
| 46 | 46 | */ |
| 47 | 47 | public static function getRequiredModules() |
| 48 | 48 | { |
@@ -87,8 +87,7 @@ discard block |
||
| 87 | 87 | * Run application |
| 88 | 88 | * @param mixed|array $appConfig |
| 89 | 89 | * |
| 90 | - * @param bool $run |
|
| 91 | - * @return bool|ZendApplication |
|
| 90 | + * @return null|ZendApplication |
|
| 92 | 91 | */ |
| 93 | 92 | public static function initApplication($appConfig = null) |
| 94 | 93 | { |
@@ -34,8 +34,8 @@ discard block |
||
| 34 | 34 | $dotenv = new Dotenv(); |
| 35 | 35 | $dotenv->load($env); |
| 36 | 36 | } |
| 37 | - $version = getenv('TRAVIS') ? "undefined":exec('git describe'); |
|
| 38 | - $branch = getenv('TRAVIS') ? "undefined":exec('git rev-parse --abbrev-ref HEAD', $output, $retVal); |
|
| 37 | + $version = getenv('TRAVIS') ? "undefined" : exec('git describe'); |
|
| 38 | + $branch = getenv('TRAVIS') ? "undefined" : exec('git rev-parse --abbrev-ref HEAD', $output, $retVal); |
|
| 39 | 39 | static::$VERSION = $version.'['.$branch.']'; |
| 40 | 40 | } |
| 41 | 41 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | * @param array $loadModules |
| 76 | 76 | * @return array |
| 77 | 77 | */ |
| 78 | - public static function generateModuleConfiguration($loadModules=[]) |
|
| 78 | + public static function generateModuleConfiguration($loadModules = []) |
|
| 79 | 79 | { |
| 80 | 80 | return ArrayUtils::merge( |
| 81 | 81 | static::getRequiredModules(), |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $file = null; |
| 103 | 103 | if (is_file($test = getcwd().'/test/config/config.php')) { |
| 104 | 104 | $file = $test; |
| 105 | - } elseif (is_file($test = getcwd(). '/config/config.php')) { |
|
| 105 | + } elseif (is_file($test = getcwd().'/config/config.php')) { |
|
| 106 | 106 | $file = $test; |
| 107 | 107 | } elseif (is_file($test = __DIR__.'/../config/config.php')) { |
| 108 | 108 | $file = $test; |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | return ZendApplication::init($appConfig); |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | - public static function runApplication($appConfig=null) |
|
| 125 | + public static function runApplication($appConfig = null) |
|
| 126 | 126 | { |
| 127 | 127 | ini_set('display_errors', true); |
| 128 | 128 | ini_set('error_reporting', E_ALL | E_STRICT); |
@@ -137,15 +137,15 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | if (php_sapi_name() == 'cli-server') { |
| 139 | 139 | $parseUrl = parse_url(substr($_SERVER["REQUEST_URI"], 1)); |
| 140 | - $route = isset($parseUrl['path']) ? $parseUrl['path']:null; |
|
| 141 | - if (is_file(__DIR__ . '/' . $route)) { |
|
| 140 | + $route = isset($parseUrl['path']) ? $parseUrl['path'] : null; |
|
| 141 | + if (is_file(__DIR__.'/'.$route)) { |
|
| 142 | 142 | if (substr($route, -4) == ".php") { |
| 143 | - require __DIR__ . '/' . $route; // Include requested script files |
|
| 143 | + require __DIR__.'/'.$route; // Include requested script files |
|
| 144 | 144 | exit; |
| 145 | 145 | } |
| 146 | - return false; // Serve file as is |
|
| 146 | + return false; // Serve file as is |
|
| 147 | 147 | } else { // Fallback to index.php |
| 148 | - $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
| 148 | + $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
| 149 | 149 | } |
| 150 | 150 | } |
| 151 | 151 | return static::initApplication($appConfig)->run(); |
@@ -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 = |
@@ -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; |
@@ -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 | /** |
@@ -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 | |
@@ -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 | { |
@@ -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', |
@@ -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 | { |