@@ -38,8 +38,8 @@ |
||
| 38 | 38 | $addModules = require $moduleFile; |
| 39 | 39 | foreach ($addModules as $addModule) { |
| 40 | 40 | if (strpos($addModule, '-') === 0) { |
| 41 | - $remove = substr($addModule,1); |
|
| 42 | - $modules = array_filter($modules, function ($elem) use ($remove) { return strcasecmp($elem,$remove); }); |
|
| 41 | + $remove = substr($addModule, 1); |
|
| 42 | + $modules = array_filter($modules, function($elem) use ($remove) { return strcasecmp($elem, $remove); }); |
|
| 43 | 43 | } |
| 44 | 44 | else { |
| 45 | 45 | if (!in_array($addModule, $modules)) { |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | 'Zend\Loader\StandardAutoloader' => array( |
| 64 | 64 | 'namespaces' => array( |
| 65 | 65 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
| 66 | - __NAMESPACE__ . 'Test' => __DIR__ . '/test/' . __NAMESPACE__ .'Test', |
|
| 66 | + __NAMESPACE__ . 'Test' => __DIR__ . '/test/' . __NAMESPACE__ . 'Test', |
|
| 67 | 67 | ), |
| 68 | 68 | ), |
| 69 | 69 | ); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | if (!$application) { |
| 89 | 89 | throw new \RuntimeException('Invalid application id.'); |
| 90 | 90 | } |
| 91 | - $action = 'process'; |
|
| 91 | + $action = 'process'; |
|
| 92 | 92 | |
| 93 | 93 | |
| 94 | 94 | |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | if ('sendmail' == $this->params()->fromQuery('do')) { |
| 269 | - $jobEntity = $application->job; |
|
| 269 | + $jobEntity = $application->job; |
|
| 270 | 270 | ; |
| 271 | 271 | $mailData = array( |
| 272 | 272 | 'application' => $application, |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | echo "Generate keywords for $count applications ...\n"; |
| 66 | 66 | |
| 67 | - $progress = new ProgressBar($count); |
|
| 67 | + $progress = new ProgressBar($count); |
|
| 68 | 68 | |
| 69 | 69 | /** @var PropertyToKeywords $filter */ |
| 70 | 70 | $filter = $services->get('filtermanager')->get('Core/Repository/PropertyToKeywords'); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | { |
| 99 | 99 | $applications = $this->fetchApplications(); |
| 100 | 100 | $count = count($applications); |
| 101 | - $i=0; |
|
| 101 | + $i = 0; |
|
| 102 | 102 | echo "Calculate rating for " . $count . " applications ...\n"; |
| 103 | 103 | |
| 104 | 104 | $progress = new ProgressBar($count); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $documentManager = $services->get('Core/DocumentManager'); |
| 133 | 133 | |
| 134 | 134 | $count = count($applications); |
| 135 | - $i=0; |
|
| 135 | + $i = 0; |
|
| 136 | 136 | |
| 137 | 137 | echo $count . " applications in Draft Mode and older than " . $days . " days will be deleted\n"; |
| 138 | 138 | |
@@ -162,17 +162,17 @@ discard block |
||
| 162 | 162 | |
| 163 | 163 | $table->appendRow(array('Module', 'Name', 'Description')); |
| 164 | 164 | |
| 165 | - $offset=strlen(getcwd())+1; |
|
| 166 | - $links=""; |
|
| 167 | - $github='https://github.com/cross-solution/YAWIK/blob/master/'; |
|
| 165 | + $offset = strlen(getcwd()) + 1; |
|
| 166 | + $links = ""; |
|
| 167 | + $github = 'https://github.com/cross-solution/YAWIK/blob/master/'; |
|
| 168 | 168 | |
| 169 | 169 | foreach ($config['view_manager']['template_map'] as $key => $absolute_filename) { |
| 170 | 170 | // strip the application_root plus an additional slash |
| 171 | - $filename=substr(realpath($absolute_filename), $offset); |
|
| 171 | + $filename = substr(realpath($absolute_filename), $offset); |
|
| 172 | 172 | if (preg_match('~module/([^/]+)~', $filename, $match)) { |
| 173 | - $module=$match[1]; |
|
| 173 | + $module = $match[1]; |
|
| 174 | 174 | } else { |
| 175 | - $module="not found ($key)"; |
|
| 175 | + $module = "not found ($key)"; |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | $viewModel = new ViewModel(); |
@@ -182,23 +182,23 @@ discard block |
||
| 182 | 182 | $row->appendColumn(new Column($module)); |
| 183 | 183 | if ($filename) { |
| 184 | 184 | $row->appendColumn(new Column('`' . $key . '`_')); |
| 185 | - $links.='.. _'. $key .': '. $github.$filename .PHP_EOL; |
|
| 185 | + $links .= '.. _' . $key . ': ' . $github . $filename . PHP_EOL; |
|
| 186 | 186 | } else { |
| 187 | 187 | $row->appendColumn(new Column("WRONG CONFIGURATION")); |
| 188 | 188 | } |
| 189 | - $comment=""; |
|
| 189 | + $comment = ""; |
|
| 190 | 190 | if (file_exists($absolute_filename)) { |
| 191 | - $src=file_get_contents($absolute_filename); |
|
| 192 | - $comment="file exists"; |
|
| 191 | + $src = file_get_contents($absolute_filename); |
|
| 192 | + $comment = "file exists"; |
|
| 193 | 193 | if (preg_match("/{{rtd:\s*(.*)}}/", $src, $match)) { |
| 194 | - $comment=$match['1']; |
|
| 194 | + $comment = $match['1']; |
|
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 | $row->appendColumn(new Column($comment)); |
| 198 | 198 | $table->appendRow($row); |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | - echo $table.PHP_EOL; |
|
| 201 | + echo $table . PHP_EOL; |
|
| 202 | 202 | echo $links; |
| 203 | 203 | |
| 204 | 204 | return PHP_EOL; |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | { |
| 209 | 209 | echo "Loading applications... "; |
| 210 | 210 | |
| 211 | - $filter = \Zend\Json\Json::decode($this->params('filter', '{}'), \Zend\Json\Json::TYPE_ARRAY); |
|
| 211 | + $filter = \Zend\Json\Json::decode($this->params('filter', '{}'), \Zend\Json\Json::TYPE_ARRAY); |
|
| 212 | 212 | $filter['$or'] = array( |
| 213 | 213 | array('attachments' => array('$exists' => 1)), |
| 214 | 214 | array('contact.image' => array('$exists' => 1)), |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | return; |
| 223 | 223 | } |
| 224 | 224 | $progress = new ProgressBar($count); |
| 225 | - $i=0; |
|
| 225 | + $i = 0; |
|
| 226 | 226 | |
| 227 | 227 | foreach ($applications as $app) { |
| 228 | 228 | $progress->update($i++, "Process $i / $count"); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $job = ($request->isPost() && !empty($jobId)) |
| 76 | 76 | ? $services->get('repositories')->get('Jobs/Job')->find($jobId) |
| 77 | - : $services->get('repositories')->get('Jobs/Job')->findOneBy(array("applyId"=>(0 == $applyId)?$this->params('jobId'):$applyId)); |
|
| 77 | + : $services->get('repositories')->get('Jobs/Job')->findOneBy(array("applyId"=>(0 == $applyId) ? $this->params('jobId') : $applyId)); |
|
| 78 | 78 | |
| 79 | 79 | |
| 80 | 80 | if (!$job) { |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | |
| 281 | 281 | //default sorting |
| 282 | 282 | if (!isset($params['sort'])) { |
| 283 | - $params['sort']="-date"; |
|
| 283 | + $params['sort'] = "-date"; |
|
| 284 | 284 | } |
| 285 | 285 | $params->count = 5; |
| 286 | 286 | $this->paginationParams()->setParams('Applications\Index', $params); |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | $jobEntity = $entityApplication->job; |
| 313 | 313 | $applicantEmail = $entityApplication->contact->email; |
| 314 | 314 | $organizationEmail = $jobEntity->contactEmail; |
| 315 | - $mailAddress = null; |
|
| 315 | + $mailAddress = null; |
|
| 316 | 316 | switch ($status == 'test') { |
| 317 | 317 | case 'company': |
| 318 | 318 | $mailAddress = $organizationEmail; |
@@ -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 | } |
@@ -33,6 +33,6 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | function getUri() |
| 35 | 35 | { |
| 36 | - return "/file/Applications.Attachment/" . $this->id . "/" .urlencode($this->name); |
|
| 36 | + return "/file/Applications.Attachment/" . $this->id . "/" . urlencode($this->name); |
|
| 37 | 37 | } |
| 38 | 38 | } |
@@ -53,8 +53,8 @@ |
||
| 53 | 53 | if (!defined($constant)) { |
| 54 | 54 | throw new \DomainException('Unknown status: ' . $status); |
| 55 | 55 | } |
| 56 | - $this->name=constant($constant); |
|
| 57 | - $this->order=$this->getOrder(); |
|
| 56 | + $this->name = constant($constant); |
|
| 57 | + $this->order = $this->getOrder(); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | /** |
| 21 | 21 | * A new application has been received |
| 22 | 22 | */ |
| 23 | - const INCOMING = 'incoming'; |
|
| 23 | + const INCOMING = 'incoming'; |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * An acknowledgement of receipt has been sent |
@@ -30,12 +30,12 @@ discard block |
||
| 30 | 30 | /** |
| 31 | 31 | * An applicant ist invited to in interview |
| 32 | 32 | */ |
| 33 | - const INVITED = 'invited'; |
|
| 33 | + const INVITED = 'invited'; |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * The applicant has been canceled |
| 37 | 37 | */ |
| 38 | - const REJECTED = 'rejected'; |
|
| 38 | + const REJECTED = 'rejected'; |
|
| 39 | 39 | |
| 40 | 40 | public function __construct($status = self::INCOMING); |
| 41 | 41 | |