ResultPage::setUid()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Sportic\Timing\RaceTecClient\Scrapers;
4
5
use Sportic\Timing\RaceTecClient\Parsers\ResultPage as Parser;
6
use Symfony\Component\DomCrawler\Crawler;
7
8
/**
9
 * Class CompanyPage
10
 * @package Sportic\Timing\RaceTecClient\Scrapers
11
 *
12
 * @method Parser execute()
13
 */
14
class ResultPage extends AbstractScraper
15
{
16
    protected $uid;
17
18
    /**
19
     * ResultPage constructor.
20
     *
21
     * @param $uid
22
     */
23 2
    public function __construct($uid)
24
    {
25 2
        $this->uid = $uid;
26 2
    }
27
28
    /**
29
     * @return mixed
30
     */
31 2
    public function getUid()
32
    {
33 2
        return $this->uid;
34
    }
35
36
    /**
37
     * @param mixed $uid
38
     */
39
    public function setUid($uid)
40
    {
41
        $this->uid = $uid;
42
    }
43
44
    /**
45
     * @inheritdoc
46
     */
47 2
    protected function generateCrawler()
48
    {
49 2
        $client  = $this->getClient();
50 2
        $crawler = $client->request(
51 2
            'GET',
52 2
            $this->getCrawlerUri()
53
        );
54
55 2
        return $crawler;
56
    }
57
58
    /**
59
     * @return Crawler
60
     */
61 2
    public function getCrawlerUri()
62
    {
63 2
        return $this->getCrawlerUriHost().'/MyResults.aspx?'
64 2
               . 'uid=' . $this->getUid();
65
    }
66
}
67