BaseReport::createReportRequest()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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 30
    public function __construct()
18
    {
19 30
        $this->createReportRequest();
20 30
    }
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