LeverVariable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 3
c 2
b 0
f 0
dl 0
loc 25
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A jobs() 0 3 1
A job() 0 3 1
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