PhpjobsQuery::getBaseUrl()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php namespace JobApis\Jobs\Client\Queries;
2
3
class PhpjobsQuery extends AbstractQuery
4
{
5
    /**
6
     * search_string
7
     *
8
     * The search query.
9
     *
10
     * @var string
11
     */
12
    protected $search_string;
13
14
    /**
15
     * country_code
16
     *
17
     * The country string to search.
18
     *
19
     * @var string
20
     */
21
    protected $country_code;
22
23
    /**
24
     * format
25
     *
26
     * Must be 'rss20'
27
     *
28
     * @var string
29
     */
30
    protected $format;
31
32
    /**
33
     * search
34
     *
35
     * Must be '1'
36
     *
37
     * @var string
38
     */
39
    protected $search;
40
41
    /**
42
     * Get baseUrl
43
     *
44
     * @return  string Value of the base url to this api
45
     */
46 8
    public function getBaseUrl()
47
    {
48 8
        return 'http://www.phpjobs.com/search';
49
    }
50
51
    /**
52
     * Get keyword
53
     *
54
     * @return  string Attribute being used as the search keyword
55
     */
56 4
    public function getKeyword()
57
    {
58 4
        return $this->search_string;
59
    }
60
61 18
    public function defaultAttributes()
62
    {
63
        return [
64 18
            'format' => 'rss20',
65 18
            'search' => '1',
66 18
        ];
67
    }
68
69 4
    public function requiredAttributes()
70
    {
71
        return [
72 4
            'format',
73 4
            'search',
74 4
        ];
75
    }
76
}
77