LeverVariable::jobs()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * Lever plugin for Craft CMS 3.x
4
 *
5
 * Craft + Lever.
6
 *
7
 * @link      https://workingconcept.com
8
 * @copyright Copyright (c) 2018 Working Concept Inc.
9
 */
10
11
namespace workingconcept\lever\variables;
12
13
use workingconcept\lever\Lever;
14
15
/**
16
 * @author    Working Concept
17
 * @package   Lever
18
 * @since     1.0.0
19
 */
20
class LeverVariable
21
{
22
    /**
23
     * Get a list of jobs.
24
     *
25
     * @param array $params Valid URL parameters for search.
26
     *
27
     * @return mixed
28
     * @throws
29
     */
30
    public function jobs($params = [])
31
    {
32
        return Lever::$plugin->api->getJobs($params);
33
    }
34
35
    /**
36
     * Get a single job by ID.
37
     *
38
     * @param $id
39
     * @return mixed
40
     * @throws
41
     */
42
    public function job($id)
43
    {
44
        return Lever::$plugin->api->getJobById($id);
45
    }
46
47
}
48