JobCrawl::getMaxToCrawl()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

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
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Swader\Diffbot\Entity;
4
5
use Swader\Diffbot\Abstracts\Job;
6
7
class JobCrawl extends Job
8
{
9
    /**
10
     * Maximum number of pages to crawl
11
     * @see http://support.diffbot.com/crawlbot/whats-the-difference-between-crawling-and-processing/
12
     *
13
     * @return int
14
     */
15 1
    public function getMaxToCrawl()
16
    {
17 1
        return (int)$this->data['maxToCrawl'];
18
    }
19
20
    /**
21
     * Maximum number of pages to process
22
     * @see http://support.diffbot.com/crawlbot/whats-the-difference-between-crawling-and-processing/
23
     *
24
     * @return int
25
     */
26 1
    public function getMaxToProcess()
27
    {
28 1
        return (int)$this->data['maxToProcess'];
29
    }
30
31
    /**
32
     * Whether or not the job was set to only process newly found links,
33
     * ignoring old but potentially updated ones
34
     *
35
     * @return bool
36
     */
37 1
    public function getOnlyProcessIfNew()
38
    {
39 1
        return (bool)$this->data['onlyProcessIfNew'];
40
    }
41
42
    /**
43
     * Seed URLs provided to the job. Always returned as array.
44
     *
45
     * @return array
46
     */
47 1
    public function getSeeds()
48
    {
49 1
        return explode(' ', $this->data['seeds']);
50
    }
51
}