Completed
Pull Request — master (#21)
by
unknown
05:22
created

JobPosting::jobLocations()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 5
nc 3
nop 1
1
<?php
2
3
namespace Spatie\SchemaOrg;
4
5
use Spatie\SchemaOrg\Exceptions\InvalidProperty;
6
7
/**
8
 * A listing that describes a job opening in a certain organization.
9
 *
10
 * @see http://schema.org/JobPosting
11
 */
12
class JobPosting extends Intangible
13
{
14
    /**
15
     * The base salary of the job or of an employee in an EmployeeRole.
16
     *
17
     * @param float|int|\Spatie\SchemaOrg\PriceSpecification|\Spatie\SchemaOrg\MonetaryAmount $baseSalary
18
     *
19
     * @return static
20
     *
21
     * @see http://schema.org/baseSalary
22
     */
23
    public function baseSalary($baseSalary)
24
    {
25
        return $this->setProperty('baseSalary', $baseSalary);
26
    }
27
28
    /**
29
     * Description of benefits associated with the job.
30
     *
31
     * @param string $benefits
32
     *
33
     * @return static
34
     *
35
     * @see http://schema.org/benefits
36
     */
37
    public function benefits($benefits)
38
    {
39
        return $this->setProperty('benefits', $benefits);
40
    }
41
42
    /**
43
     * Description of benefits associated with the job.
44
     *
45
     * @param string $jobBenefits
46
     *
47
     * @return static
48
     *
49
     * @see http://schema.org/jobBenefits
50
     */
51
    public function jobBenefits($jobBenefits)
52
    {
53
        return $this->setProperty('jobBenefits', $jobBenefits);
54
    }
55
56
    /**
57
     * Publication date for the job posting.
58
     *
59
     * @param \DateTimeInterface $datePosted
60
     *
61
     * @return static
62
     *
63
     * @see http://schema.org/datePosted
64
     */
65
    public function datePosted($datePosted)
66
    {
67
        return $this->setProperty('datePosted', $datePosted);
68
    }
69
70
    /**
71
     * Educational background needed for the position.
72
     *
73
     * @param string $educationRequirements
74
     *
75
     * @return static
76
     *
77
     * @see http://schema.org/educationRequirements
78
     */
79
    public function educationRequirements($educationRequirements)
80
    {
81
        return $this->setProperty('educationRequirements', $educationRequirements);
82
    }
83
84
    /**
85
     * Type of employment (e.g. full-time, part-time, contract, temporary,
86
     * seasonal, internship).
87
     *
88
     * @param string $employmentType
89
     *
90
     * @return static
91
     *
92
     * @see http://schema.org/employmentType
93
     */
94
    public function employmentType($employmentType)
95
    {
96
        return $this->setProperty('employmentType', $employmentType);
97
    }
98
99
    /**
100
     * Types of employment
101
     *
102
     * Allowed Values: FULL_TIME, PART_TIME, CONTRACTOR, TEMPORARY,
103
     * INTERN, VOLUNTEER, PER_DIEM, OTHER
104
     *
105
     * @param array ...$employmentTypes
106
     *
107
     * @return static
108
     *
109
     * @see https://developers.google.com/search/docs/data-types/job-postings
110
     */
111
    public function employmentTypes(... $employmentTypes)
112
    {
113
        return $this->setProperty('employmentType', $employmentTypes);
114
    }
115
116
    /**
117
     * Description of skills and experience needed for the position.
118
     *
119
     * @param string $experienceRequirements
120
     *
121
     * @return static
122
     *
123
     * @see http://schema.org/experienceRequirements
124
     */
125
    public function experienceRequirements($experienceRequirements)
126
    {
127
        return $this->setProperty('experienceRequirements', $experienceRequirements);
128
    }
129
130
    /**
131
     * Organization offering the job position.
132
     *
133
     * @param \Spatie\SchemaOrg\Organization $hiringOrganization
134
     *
135
     * @return static
136
     *
137
     * @see http://schema.org/hiringOrganization
138
     */
139
    public function hiringOrganization($hiringOrganization)
140
    {
141
        return $this->setProperty('hiringOrganization', $hiringOrganization);
142
    }
143
144
    /**
145
     * Description of bonus and commission compensation aspects of the job.
146
     *
147
     * @param string $incentives
148
     *
149
     * @return static
150
     *
151
     * @see http://schema.org/incentives
152
     */
153
    public function incentives($incentives)
154
    {
155
        return $this->setProperty('incentives', $incentives);
156
    }
157
158
    /**
159
     * Description of bonus and commission compensation aspects of the job.
160
     *
161
     * @param string $incentiveCompensation
162
     *
163
     * @return static
164
     *
165
     * @see http://schema.org/incentiveCompensation
166
     */
167
    public function incentiveCompensation($incentiveCompensation)
168
    {
169
        return $this->setProperty('incentiveCompensation', $incentiveCompensation);
170
    }
171
172
    /**
173
     * The industry associated with the job position.
174
     *
175
     * @param string $industry
176
     *
177
     * @return static
178
     *
179
     * @see http://schema.org/industry
180
     */
181
    public function industry($industry)
182
    {
183
        return $this->setProperty('industry', $industry);
184
    }
185
186
    /**
187
     * A (typically single) geographic location associated with the job
188
     * position.
189
     *
190
     * @param \Spatie\SchemaOrg\Place $jobLocation
191
     *
192
     * @return static
193
     *
194
     * @see http://schema.org/jobLocation
195
     */
196
    public function jobLocation($jobLocation)
197
    {
198
        return $this->setProperty('jobLocation', $jobLocation);
199
    }
200
201
    /**
202
     * An array of geographic locations associated with the job position
203
     *
204
     * @param array ...$jobLocations an array of Place objects
205
     *
206
     * @return static
207
     *
208
     * @throws InvalidProperty when other object types are passed in
209
     */
210
    public function jobLocations(... $jobLocations)
211
    {
212
        foreach ($jobLocations as $jobLocation) {
213
            if (!$jobLocation instanceof Place) {
214
                throw new InvalidProperty("A Job Location must be of type Place");
215
            }
216
        }
217
218
        return $this->setProperty('jobLocation', $jobLocations);
219
    }
220
221
    /**
222
     * Category or categories describing the job. Use BLS O*NET-SOC taxonomy:
223
     * http://www.onetcenter.org/taxonomy.html. Ideally includes textual label
224
     * and formal code, with the property repeated for each applicable value.
225
     *
226
     * @param string $occupationalCategory
227
     *
228
     * @return static
229
     *
230
     * @see http://schema.org/occupationalCategory
231
     */
232
    public function occupationalCategory($occupationalCategory)
233
    {
234
        return $this->setProperty('occupationalCategory', $occupationalCategory);
235
    }
236
237
    /**
238
     * Specific qualifications required for this role.
239
     *
240
     * @param string $qualifications
241
     *
242
     * @return static
243
     *
244
     * @see http://schema.org/qualifications
245
     */
246
    public function qualifications($qualifications)
247
    {
248
        return $this->setProperty('qualifications', $qualifications);
249
    }
250
251
    /**
252
     * Responsibilities associated with this role.
253
     *
254
     * @param string $responsibilities
255
     *
256
     * @return static
257
     *
258
     * @see http://schema.org/responsibilities
259
     */
260
    public function responsibilities($responsibilities)
261
    {
262
        return $this->setProperty('responsibilities', $responsibilities);
263
    }
264
265
    /**
266
     * The currency (coded using [ISO
267
     * 4217](http://en.wikipedia.org/wiki/ISO_4217) ) used for the main salary
268
     * information in this job posting or for this employee.
269
     *
270
     * @param string $salaryCurrency
271
     *
272
     * @return static
273
     *
274
     * @see http://schema.org/salaryCurrency
275
     */
276
    public function salaryCurrency($salaryCurrency)
277
    {
278
        return $this->setProperty('salaryCurrency', $salaryCurrency);
279
    }
280
281
    /**
282
     * Skills required to fulfill this role.
283
     *
284
     * @param string $skills
285
     *
286
     * @return static
287
     *
288
     * @see http://schema.org/skills
289
     */
290
    public function skills($skills)
291
    {
292
        return $this->setProperty('skills', $skills);
293
    }
294
295
    /**
296
     * Any special commitments associated with this job posting. Valid entries
297
     * include VeteranCommit, MilitarySpouseCommit, etc.
298
     *
299
     * @param string $specialCommitments
300
     *
301
     * @return static
302
     *
303
     * @see http://schema.org/specialCommitments
304
     */
305
    public function specialCommitments($specialCommitments)
306
    {
307
        return $this->setProperty('specialCommitments', $specialCommitments);
308
    }
309
310
    /**
311
     * The title of the job.
312
     *
313
     * @param string $title
314
     *
315
     * @return static
316
     *
317
     * @see http://schema.org/title
318
     */
319
    public function title($title)
320
    {
321
        return $this->setProperty('title', $title);
322
    }
323
324
    /**
325
     * The date after when the item is not valid. For example the end of an
326
     * offer, salary period, or a period of opening hours.
327
     *
328
     * @param \DateTimeInterface $validThrough
329
     *
330
     * @return static
331
     *
332
     * @see http://schema.org/validThrough
333
     */
334
    public function validThrough($validThrough)
335
    {
336
        return $this->setProperty('validThrough', $validThrough);
337
    }
338
339
    /**
340
     * The typical working hours for this job (e.g. 1st shift, night shift,
341
     * 8am-5pm).
342
     *
343
     * @param string $workHours
344
     *
345
     * @return static
346
     *
347
     * @see http://schema.org/workHours
348
     */
349
    public function workHours($workHours)
350
    {
351
        return $this->setProperty('workHours', $workHours);
352
    }
353
354
}
355