@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * |
| 62 | 62 | * @return string |
| 63 | 63 | */ |
| 64 | - public function transform(JobInterface $job, $options = []) |
|
| 64 | + public function transform(JobInterface $job, $options = [ ]) |
|
| 65 | 65 | { |
| 66 | 66 | $applyUrl = $this->getApplyUrlHelper(); |
| 67 | 67 | |
@@ -74,10 +74,10 @@ discard block |
||
| 74 | 74 | $xml->addChild('test', 'true'); |
| 75 | 75 | |
| 76 | 76 | |
| 77 | - $xml->addChild('action', isset($options['action']) ? $options['action'] : 'post'); |
|
| 77 | + $xml->addChild('action', isset($options[ 'action' ]) ? $options[ 'action' ] : 'post'); |
|
| 78 | 78 | |
| 79 | - if (isset($options['externalId'])) { |
|
| 80 | - $xml->addChild('jobid', $options['externalId']); |
|
| 79 | + if (isset($options[ 'externalId' ])) { |
|
| 80 | + $xml->addChild('jobid', $options[ 'externalId' ]); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | $xml->addChild('title', $job->getTitle()); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | } else if ($atsMode->isUri()) { |
| 102 | 102 | $xml->addChild('howtoapply', $atsMode->getUri()); |
| 103 | 103 | } else if (is_callable($applyUrl)) { |
| 104 | - $xml->addChild('howtoapply', $applyUrl($job, ['linkOnly' => true, 'absolute' => true])); |
|
| 104 | + $xml->addChild('howtoapply', $applyUrl($job, [ 'linkOnly' => true, 'absolute' => true ])); |
|
| 105 | 105 | } else { |
| 106 | 106 | $xml->addChild('howtoapply', 'postalisch'); |
| 107 | 107 | } |
@@ -117,49 +117,49 @@ discard block |
||
| 117 | 117 | $coords = $location->getCoordinates(); |
| 118 | 118 | if (CoordinatesInterface::TYPE_POINT == $coords->getType()) { |
| 119 | 119 | $c = $coords->getCoordinates(); |
| 120 | - $l->addAttribute('lon', $c[0]); |
|
| 121 | - $l->addAttribute('lat', $c[1]); |
|
| 120 | + $l->addAttribute('lon', $c[ 0 ]); |
|
| 121 | + $l->addAttribute('lat', $c[ 1 ]); |
|
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - foreach (['topspot', 'featured', 'remote', 'relocation', 'visasponsorship', 'sysadmin'] as $boolOpt) { |
|
| 127 | - if (isset($options[$boolOpt])) { |
|
| 128 | - $xml->addChild($boolOpt, $options[$boolOpt] ? 'true' : 'false'); |
|
| 126 | + foreach ([ 'topspot', 'featured', 'remote', 'relocation', 'visasponsorship', 'sysadmin' ] as $boolOpt) { |
|
| 127 | + if (isset($options[ $boolOpt ])) { |
|
| 128 | + $xml->addChild($boolOpt, $options[ $boolOpt ] ? 'true' : 'false'); |
|
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - foreach (['length', 'coupon', 'pixel'] as $strOpt) { |
|
| 133 | - if (isset($options[$strOpt])) { |
|
| 134 | - $xml->addChild($strOpt, $options[$strOpt]); |
|
| 132 | + foreach ([ 'length', 'coupon', 'pixel' ] as $strOpt) { |
|
| 133 | + if (isset($options[ $strOpt ])) { |
|
| 134 | + $xml->addChild($strOpt, $options[ $strOpt ]); |
|
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - $xml->addChild('description', html_entity_decode($job->getTemplateValues()->getDescription()) ?: '<p></p>'); |
|
| 138 | + $xml->addChild('description', html_entity_decode($job->getTemplateValues()->getDescription()) ?: '<p></p>'); |
|
| 139 | 139 | |
| 140 | 140 | if ($requirements = $job->getTemplateValues()->getRequirements()) { |
| 141 | 141 | $xml->addChild('requirements', $requirements); |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | $tags = $xml->addChild('tags'); |
| 145 | - if (isset($options['keywords']) && is_array($options['keyword'])) { |
|
| 146 | - foreach ($options['keywords'] as $keyword) { |
|
| 145 | + if (isset($options[ 'keywords' ]) && is_array($options[ 'keyword' ])) { |
|
| 146 | + foreach ($options[ 'keywords' ] as $keyword) { |
|
| 147 | 147 | $tags->addChild('tag', $keyword); |
| 148 | 148 | } |
| 149 | 149 | } else { |
| 150 | 150 | $tags->addChild('tag', 'none'); |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - if (isset($options['advertisingregions']) && is_array($options['advertisingregions'])) { |
|
| 153 | + if (isset($options[ 'advertisingregions' ]) && is_array($options[ 'advertisingregions' ])) { |
|
| 154 | 154 | $regions = $xml->addChild('advertisingregioncodes'); |
| 155 | - foreach ($options['advertisingregions'] as $adreg) { |
|
| 155 | + foreach ($options[ 'advertisingregions' ] as $adreg) { |
|
| 156 | 156 | $regions->addChild('regioncode', $adreg); |
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | - if (isset($options['advertisingcountries']) && is_array($options['advertisingcountries'])) { |
|
| 160 | + if (isset($options[ 'advertisingcountries' ]) && is_array($options[ 'advertisingcountries' ])) { |
|
| 161 | 161 | $countries = $xml->addChild('advertisingcountrycodes'); |
| 162 | - foreach ($options['advertisingcountries'] as $adcountry) { |
|
| 162 | + foreach ($options[ 'advertisingcountries' ] as $adcountry) { |
|
| 163 | 163 | $countries->addChild('regioncode', $adcountry); |
| 164 | 164 | } |
| 165 | 165 | } |