@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * YAWIK |
|
| 4 | - * |
|
| 5 | - * @filesource |
|
| 6 | - * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de) |
|
| 7 | - * @license MIT |
|
| 8 | - */ |
|
| 3 | + * YAWIK |
|
| 4 | + * |
|
| 5 | + * @filesource |
|
| 6 | + * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de) |
|
| 7 | + * @license MIT |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | /** */ |
| 11 | 11 | namespace Applications\Factory\Form; |
@@ -73,14 +73,14 @@ discard block |
||
| 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); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | * |
| 57 | 57 | * @var string |
| 58 | 58 | */ |
| 59 | - protected $options="Applications/Options"; |
|
| 59 | + protected $options = "Applications/Options"; |
|
| 60 | 60 | |
| 61 | 61 | |
| 62 | 62 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | ->setIsDescriptionsEnabled(true) |
| 78 | 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)] |
|
| 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'); |
@@ -39,10 +39,10 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | case "days": |
| 41 | 41 | $date = new \DateTime(); |
| 42 | - $date->modify('-' . (int) $value. ' day'); |
|
| 42 | + $date->modify('-' . (int) $value . ' day'); |
|
| 43 | 43 | $q = array('$lt' => $date); |
| 44 | 44 | if (isset($query['datePublishStart.date'])) { |
| 45 | - $query['datePublishStart.date']= array_merge( |
|
| 45 | + $query['datePublishStart.date'] = array_merge( |
|
| 46 | 46 | $query['datePublishStart.date'], |
| 47 | 47 | $q |
| 48 | 48 | ); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | echo "$count jobs found, which have to expire ...\n"; |
| 74 | 74 | |
| 75 | - $progress = new ProgressBar( |
|
| 75 | + $progress = new ProgressBar( |
|
| 76 | 76 | new ConsoleAdapter( |
| 77 | 77 | array( |
| 78 | 78 | 'elements' => array( |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | continue; |
| 133 | 133 | } |
| 134 | 134 | try { |
| 135 | - $group = $user->getGroup($job->getCompany()); |
|
| 135 | + $group = $user->getGroup($job->getCompany()); |
|
| 136 | 136 | } catch (\Exception $e) { |
| 137 | 137 | continue; |
| 138 | 138 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $entity = $repositoriesJob->findOneBy(array("applyId" => (string) $applyId)); |
| 106 | 106 | if (!isset($entity)) { |
| 107 | 107 | // new Job (the more likely branch) |
| 108 | - $entity =$repositoriesJob->create(array("applyId" => (string) $applyId)); |
|
| 108 | + $entity = $repositoriesJob->create(array("applyId" => (string) $applyId)); |
|
| 109 | 109 | } else { |
| 110 | 110 | $createdJob = false; |
| 111 | 111 | } |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | $jobLocations->clear(); |
| 195 | 195 | foreach ($locations as $locData) { |
| 196 | 196 | $location = new Location(); |
| 197 | - $coords = array_map(function ($i) { return (float) $i; }, $locData['coordinates']); |
|
| 197 | + $coords = array_map(function($i) { return (float) $i; }, $locData['coordinates']); |
|
| 198 | 198 | $location->setCountry($locData['country']) |
| 199 | 199 | ->setRegion($locData['region']) |
| 200 | 200 | ->setCity($locData['city']) |
@@ -41,9 +41,9 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | public function __construct(RepositoryService $repositoryService, AuthenticationService $auth, Acl $acl) |
| 43 | 43 | { |
| 44 | - $this->repositoryService=$repositoryService; |
|
| 45 | - $this->auth=$auth; |
|
| 46 | - $this->acl=$acl; |
|
| 44 | + $this->repositoryService = $repositoryService; |
|
| 45 | + $this->auth = $auth; |
|
| 46 | + $this->acl = $acl; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | public function __invoke() |
@@ -61,12 +61,12 @@ discard block |
||
| 61 | 61 | public function get(Params $params, $allowDraft = false) |
| 62 | 62 | { |
| 63 | 63 | /* @var \Jobs\Repository\Job $jobRepository */ |
| 64 | - $jobRepository = $this->repositoryService->get('Jobs/Job'); |
|
| 64 | + $jobRepository = $this->repositoryService->get('Jobs/Job'); |
|
| 65 | 65 | $idFromRoute = $params('id', 0); |
| 66 | 66 | $idFromQuery = $params->fromQuery('id', 0); |
| 67 | 67 | $idFromSubForm = $params->fromPost('job', 0); |
| 68 | 68 | |
| 69 | - $id = empty($idFromRoute)? (empty($idFromQuery)?$idFromSubForm:$idFromQuery) : $idFromRoute; |
|
| 69 | + $id = empty($idFromRoute) ? (empty($idFromQuery) ? $idFromSubForm : $idFromQuery) : $idFromRoute; |
|
| 70 | 70 | |
| 71 | 71 | if (empty($id) && $allowDraft) { |
| 72 | 72 | $this->acl->__invoke('Jobs/Manage', 'new'); |
@@ -23,35 +23,35 @@ discard block |
||
| 23 | 23 | /** |
| 24 | 24 | * Job has been published |
| 25 | 25 | */ |
| 26 | - const RESPONSE_OK = 'ok'; |
|
| 26 | + const RESPONSE_OK = 'ok'; |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Job has been published and has stopped all other publishing |
| 30 | 30 | */ |
| 31 | - const RESPONSE_OKANDSTOP = 'ok and publishing terminated afterwards'; |
|
| 31 | + const RESPONSE_OKANDSTOP = 'ok and publishing terminated afterwards'; |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * publishing has been stopped |
| 35 | 35 | */ |
| 36 | - const RESPONSE_STOP = 'publishing terminated'; |
|
| 36 | + const RESPONSE_STOP = 'publishing terminated'; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * publishing has been denied, |
| 40 | 40 | * this is very likely when a job was not intended to be sended to a portal |
| 41 | 41 | */ |
| 42 | - const RESPONSE_DENIED = 'denied'; |
|
| 42 | + const RESPONSE_DENIED = 'denied'; |
|
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * a connection to the portal could not be established |
| 46 | 46 | * or the publishing of the Job has been rejected for other reasons |
| 47 | 47 | */ |
| 48 | - const RESPONSE_FAIL = 'fail'; |
|
| 48 | + const RESPONSE_FAIL = 'fail'; |
|
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * This error has nothing to do with wrong inputs, |
| 52 | 52 | * something just has happend in the programm |
| 53 | 53 | */ |
| 54 | - const RESPONSE_ERROR = 'internal Error'; |
|
| 54 | + const RESPONSE_ERROR = 'internal Error'; |
|
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * nothing happens, but that's not a failure |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | /** |
| 63 | 63 | * nothing happens, and get used to it |
| 64 | 64 | */ |
| 65 | - const RESPONSE_DEPRECATED = 'deprecated'; |
|
| 65 | + const RESPONSE_DEPRECATED = 'deprecated'; |
|
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | 68 | * @var string |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * @param string $portal |
| 84 | 84 | * @param string $status |
| 85 | 85 | */ |
| 86 | - public function __construct($portal = '', $status = self::RESPONSE_NOTIMPLEMENTED, $message='') |
|
| 86 | + public function __construct($portal = '', $status = self::RESPONSE_NOTIMPLEMENTED, $message = '') |
|
| 87 | 87 | { |
| 88 | 88 | $this->portal = $portal; |
| 89 | 89 | $this->status = $status; |
@@ -480,7 +480,7 @@ |
||
| 480 | 480 | if ($removePermissions) { |
| 481 | 481 | $this->getPermissions()->revoke($this->user, Permissions::PERMISSION_ALL); |
| 482 | 482 | } |
| 483 | - $this->user=null; |
|
| 483 | + $this->user = null; |
|
| 484 | 484 | } |
| 485 | 485 | |
| 486 | 486 | return $this; |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | $object = parent::hydrate($data, $object); |
| 44 | 44 | /* @var \Organizations\Entity\Template $template */ |
| 45 | - $template=$object->getOrganization()->getTemplate(); |
|
| 45 | + $template = $object->getOrganization()->getTemplate(); |
|
| 46 | 46 | if (isset($data['description-label-requirements'])) { |
| 47 | 47 | $template->setLabelRequirements($data['description-label-requirements']); |
| 48 | 48 | } |
@@ -73,15 +73,15 @@ |
||
| 73 | 73 | if ('yawik' == $channelKey) { |
| 74 | 74 | $absoluteDiscount = 100; |
| 75 | 75 | } |
| 76 | - if ($channel->getPrice('base')>0) { |
|
| 76 | + if ($channel->getPrice('base') > 0) { |
|
| 77 | 77 | $sum += $channel->getPrice('base'); |
| 78 | 78 | $amount++; |
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | - $discount=1-($amount-1)*13.5/100; |
|
| 82 | - if ($discount>0) { |
|
| 83 | - $sum= round($sum * $discount, 2); |
|
| 81 | + $discount = 1 - ($amount - 1) * 13.5 / 100; |
|
| 82 | + if ($discount > 0) { |
|
| 83 | + $sum = round($sum * $discount, 2); |
|
| 84 | 84 | } |
| 85 | - return $sum-$absoluteDiscount; |
|
| 85 | + return $sum - $absoluteDiscount; |
|
| 86 | 86 | } |
| 87 | 87 | } |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | |
| 82 | 82 | if (isset($this->value['location']->coordinates)) { |
| 83 | 83 | $coordinates = $this->value['location']->coordinates->getCoordinates(); |
| 84 | - $queryBuilder->field('locations.coordinates')->geoWithinCenter($coordinates[0], $coordinates[1], (float) $this->value['d']/100); |
|
| 84 | + $queryBuilder->field('locations.coordinates')->geoWithinCenter($coordinates[0], $coordinates[1], (float) $this->value['d'] / 100); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | |