Passed
Branch master (d86252)
by Laurens
03:52 queued 53s
created

BaseReport::getReportLanguage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
namespace Werkspot\BingAdsApiBundle\Api\Report;
3
4
use BingAds\Reporting\ReportRequest;
5
6
class BaseReport implements ReportInterface
7
{
8
    const WSDL = 'https://api.bingads.microsoft.com/Api/Advertiser/Reporting/V9/ReportingService.svc?singleWsdl';
9
    const FILE_HEADERS = 10;
10
    const COLUMN_HEADERS = 1;
11
12
    /**
13
     * @var ReportRequest
14
     */
15
    protected $reportRequest;
16
17 17
    public function __construct()
18
    {
19 17
        $this->createReportRequest();
20 17
    }
21
22 4
    protected function createReportRequest()
23
    {
24 3
        $this->reportRequest = new ReportRequest();
25 4
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30 1
    public function setFormat($format)
31
    {
32 1
        $this->reportRequest->Format = $format;
33 1
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38 1
    public function setReturnOnlyCompleteData($returnOnlyCompleteData)
39
    {
40 1
        $this->reportRequest->ReturnOnlyCompleteData = $returnOnlyCompleteData;
41 1
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46 1
    public function setReportLanguage($language)
47
    {
48 1
        $this->reportRequest->Language = $language;
49 1
    }
50
51
    /**
52
     * {@inheritdoc}
53
     */
54 3
    public function getRequest()
55
    {
56 3
        return $this->reportRequest;
57
    }
58
}
59