MuseQuery   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 104
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 104
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getBaseUrl() 0 4 1
A getKeyword() 0 4 1
A defaultAttributes() 0 6 1
1
<?php namespace JobApis\Jobs\Client\Queries;
2
3
class MuseQuery extends AbstractQuery
4
{
5
    /**
6
     * Page number (defaults to "1")
7
     *
8
     * @var integer
9
     */
10
    protected $page;
11
12
    /**
13
     * API Key (rate limited to 500 reqs/hour without this)
14
     *
15
     * @var string
16
     */
17
    protected $api_key;
18
19
    /**
20
     * Descending order (defaults to false)
21
     *
22
     * @var boolean
23
     */
24
    protected $descending;
25
26
    /**
27
     * Job Category. Must be one of the following:
28
     *
29
     * - Account Management
30
     * = Business & Strategy
31
     * - Creative & Design
32
     * - Customer Service
33
     * - Data Science
34
     * - Editorial
35
     * - Education
36
     * - Engineering
37
     * - Finance
38
     * - Fundraising & Development
39
     * - Healthcare & Medicine
40
     * - HR & Recruiting
41
     * - Legal
42
     * - Marketing & PR
43
     * - Operations
44
     * - Part Time
45
     * - Project & Product Management
46
     * - receptionist
47
     * - Retail Sales
48
     * - Social Media & Community
49
     *
50
     * @var string
51
     */
52
    protected $category;
53
54
    /**
55
     * Company
56
     *
57
     * @var string
58
     */
59
    protected $company;
60
61
    /**
62
     * Job Level
63
     *
64
     * @var string
65
     */
66
    protected $level;
67
68
    /**
69
     * Job Location
70
     *
71
     * @var string
72
     */
73
    protected $location;
74
75
    /**
76
     * Get baseUrl
77
     *
78
     * @return  string Value of the base url to this api
79
     */
80 6
    public function getBaseUrl()
81
    {
82 6
        return 'https://api-v2.themuse.com/jobs';
83
    }
84
85
    /**
86
     * Get keyword
87
     *
88
     * @return  string Attribute being used as the search keyword
89
     */
90 4
    public function getKeyword()
91
    {
92 4
        return $this->category;
93
    }
94
95
    /**
96
     * Default parameters
97
     *
98
     * @var array
99
     */
100 16
    protected function defaultAttributes()
101
    {
102
        return [
103 16
            'page' => 1,
104 16
        ];
105
    }
106
}
107