Completed
Pull Request — master (#4)
by Laurens
03:17
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
    public function __construct()
18
    {
19
        $this->createReportRequest();
20
    }
21
22
    protected function createReportRequest()
23
    {
24
        $this->reportRequest = new ReportRequest();
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function setFormat($format)
31
    {
32
        $this->reportRequest->Format = $format;
1 ignored issue
show
Documentation Bug introduced by
It seems like $format of type string is incompatible with the declared type object<BingAds\Reporting\ReportFormat> of property $Format.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    public function setReturnOnlyCompleteData($returnOnlyCompleteData)
39
    {
40
        $this->reportRequest->ReturnOnlyCompleteData = $returnOnlyCompleteData;
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46
    public function setReportLanguage($language)
47
    {
48
        $this->reportRequest->Language = $language;
1 ignored issue
show
Documentation Bug introduced by
It seems like $language of type string is incompatible with the declared type object<BingAds\Reporting\ReportLanguage> of property $Language.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
49
    }
50
51
    /**
52
     * {@inheritdoc}
53
     */
54
    public function getRequest()
55
    {
56
        return $this->reportRequest;
57
    }
58
}
59