Completed
Push — master ( 47d2ac...3fd795 )
by Marijn
22s
created
Api/Client.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
     public function setConfig($config)
112 112
     {
113 113
         $this->config = $config;
114
-        $this->config['cache_dir'] = $this->config['cache_dir'] . '/' . 'BingAdsApiBundle'; //<-- important for the cache clear function
114
+        $this->config['cache_dir'] = $this->config['cache_dir'].'/'.'BingAdsApiBundle'; //<-- important for the cache clear function
115 115
         $this->config['csv']['fixHeader']['removeColumnHeader'] = true; //-- fix till i know how to do this
116 116
     }
117 117
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@
 block discarded – undo
210 210
      * to request the report identifier. The identifier is used to check report generation status
211 211
      * before downloading the report.
212 212
      *
213
-     * @param mixed  $report
213
+     * @param ReportRequest  $report
214 214
      * @param string $name
215 215
      *
216 216
      * @return string ReportRequestId
Please login to merge, or discard this patch.
Api/Helper/Csv.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
 
88 88
         for ($i = 0; $i < count($array); ++$i) {
89 89
             if ($enclosure) {
90
-                $csvStr .= $enclosure . str_replace($enclosure, $enclosure . $enclosure, $array[$i]) . $enclosure;
90
+                $csvStr .= $enclosure.str_replace($enclosure, $enclosure.$enclosure, $array[$i]).$enclosure;
91 91
             } else {
92 92
                 $csvStr .= $array[$i];
93 93
             }
Please login to merge, or discard this patch.
Tests/Api/Helper/FileTest.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function testGetFile()
27 27
     {
28
-        $nonExistingFile = ASSETS_DIR . 'iDoNotExist.txt';
29
-        $existingFile = ASSETS_DIR . 'report.csv';
28
+        $nonExistingFile = ASSETS_DIR.'iDoNotExist.txt';
29
+        $existingFile = ASSETS_DIR.'report.csv';
30 30
         $onlineFile = 'http://google.com/test.txt';
31
-        $file = ASSETS_DIR . 'example.txt';
31
+        $file = ASSETS_DIR.'example.txt';
32 32
 
33 33
         $mock = new MockHandler([new Response(200, [])]);
34 34
         $handler = HandlerStack::create($mock);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     public function testDownload()
55 55
     {
56 56
         $url = 'http://example.com';
57
-        $file = ASSETS_DIR . 'example.txt';
57
+        $file = ASSETS_DIR.'example.txt';
58 58
 
59 59
         $clientMock = Mockery::mock(Client::class);
60 60
         $clientMock
@@ -82,14 +82,14 @@  discard block
 block discarded – undo
82 82
 
83 83
     public function testUnZip()
84 84
     {
85
-        $file = ASSETS_DIR . 'test.zip';
85
+        $file = ASSETS_DIR.'test.zip';
86 86
 
87
-        $this->fileSystem->copy(ASSETS_DIR . 'report.zip', $file);
87
+        $this->fileSystem->copy(ASSETS_DIR.'report.zip', $file);
88 88
 
89 89
         $fileHelper = new File();
90 90
         $files = $fileHelper->unZip($file);
91 91
 
92
-        $this->assertEquals($files, [ASSETS_DIR . '0039202.csv']);
92
+        $this->assertEquals($files, [ASSETS_DIR.'0039202.csv']);
93 93
 
94 94
         //-- Remove the files created by this test
95 95
         foreach ($files as $file) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function testCorruptUnZip()
104 104
     {
105
-        $file = ASSETS_DIR . 'corrupt.zip';
105
+        $file = ASSETS_DIR.'corrupt.zip';
106 106
         $fileHelper = new File();
107 107
         $fileHelper->unZip($file, false);
108 108
     }
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use GuzzleHttp\Client;
6 6
 use GuzzleHttp\Exception\ClientException;
7
-use GuzzleHttp\Handler\MockHandler;
8 7
 use GuzzleHttp\HandlerStack;
8
+use GuzzleHttp\Handler\MockHandler;
9 9
 use GuzzleHttp\Psr7\Response;
10 10
 use Mockery;
11 11
 use PHPUnit_Framework_TestCase;
Please login to merge, or discard this patch.
Tests/Api/Report/GeoLocationPerformanceReportTest.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             $this->getTimeHelperMock()
69 69
         );
70 70
         $result = $apiClient->get(['TimePeriod', 'AccountName', 'AdGroupId'], 'GeoLocationPerformanceReport', ReportTimePeriod::LastWeek);
71
-        $this->assertEquals([ASSETS_DIR . 'report.csv'], $result);
71
+        $this->assertEquals([ASSETS_DIR.'report.csv'], $result);
72 72
     }
73 73
 
74 74
     public function testGeoLocationPerformanceReportMoveFile()
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
             $this->getCsvHelperMock(),
82 82
             $this->getTimeHelperMock()
83 83
         );
84
-        $result = $apiClient->get(['TimePeriod', 'AccountName', 'AdGroupId'], 'GeoLocationPerformanceReport', ReportTimePeriod::LastWeek, ASSETS_DIR . 'test.csv');
85
-        $this->assertEquals(ASSETS_DIR . 'test.csv', $result);
84
+        $result = $apiClient->get(['TimePeriod', 'AccountName', 'AdGroupId'], 'GeoLocationPerformanceReport', ReportTimePeriod::LastWeek, ASSETS_DIR.'test.csv');
85
+        $this->assertEquals(ASSETS_DIR.'test.csv', $result);
86 86
 
87 87
         //--Move File back
88 88
         $fileSystem = new Filesystem();
89
-        $fileSystem->rename(ASSETS_DIR . 'test.csv', ASSETS_DIR . 'report.csv');
89
+        $fileSystem->rename(ASSETS_DIR.'test.csv', ASSETS_DIR.'report.csv');
90 90
     }
91 91
 
92 92
     public function testGetRefreshToken()
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
             ->once()
225 225
             ->shouldReceive('unZip')
226 226
             ->with('/tmp/report.zip')
227
-            ->andReturn([ASSETS_DIR . 'report.csv'])
227
+            ->andReturn([ASSETS_DIR.'report.csv'])
228 228
             ->once();
229 229
 
230 230
         return $zipHelperMock;
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
      */
236 236
     private function getCsvHelperMock()
237 237
     {
238
-        $lines = file(ASSETS_DIR . 'report.csv');
238
+        $lines = file(ASSETS_DIR.'report.csv');
239 239
         $csvHelperMock = Mockery::mock(Helper\Csv::class);
240 240
         $csvHelperMock
241 241
             ->shouldReceive('removeHeaders')
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -279,7 +279,7 @@
 block discarded – undo
279 279
     }
280 280
 
281 281
     /**
282
-     * @param $code
282
+     * @param integer $code
283 283
      * @return SoapFault
284 284
      */
285 285
     private function generateSoapFault($code)
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@  discard block
 block discarded – undo
11 11
 use Mockery;
12 12
 use PHPUnit_Framework_TestCase;
13 13
 use SoapFault;
14
-use stdClass;
15 14
 use Symfony\Component\Filesystem\Filesystem;
16 15
 use Werkspot\BingAdsApiBundle\Api\Client;
17 16
 use Werkspot\BingAdsApiBundle\Api\Exceptions;
@@ -20,6 +19,7 @@  discard block
 block discarded – undo
20 19
 use Werkspot\BingAdsApiBundle\Guzzle\OauthTokenService;
21 20
 use Werkspot\BingAdsApiBundle\Model\AccessToken;
22 21
 use Werkspot\BingAdsApiBundle\Model\ApiDetails;
22
+use stdClass;
23 23
 
24 24
 class GeoLocationPerformanceReportTest extends PHPUnit_Framework_TestCase
25 25
 {
Please login to merge, or discard this patch.
DependencyInjection/WerkspotBingAdsApiExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         $configuration = new Configuration();
22 22
         $config = $this->processConfiguration($configuration, $configs);
23 23
 
24
-        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
24
+        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
25 25
         $loader->load('services.yml');
26 26
 
27 27
         // Once the services definition are read, get your service and add a method call to setConfig()
Please login to merge, or discard this patch.
Tests/Guzzle/RequestNewAccessTokenTest.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use GuzzleHttp\Client;
6 6
 use GuzzleHttp\Exception\ClientException;
7
-use GuzzleHttp\Handler\MockHandler;
8 7
 use GuzzleHttp\HandlerStack;
8
+use GuzzleHttp\Handler\MockHandler;
9 9
 use GuzzleHttp\Psr7\Response;
10 10
 use Mockery;
11 11
 use PHPUnit_Framework_TestCase;
Please login to merge, or discard this patch.
Api/Report/ReportInterface.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,21 +5,24 @@
 block discarded – undo
5 5
 {
6 6
     /**
7 7
      * @param string $format (See BingAds SDK documentation)
8
+     * @return void
8 9
      */
9 10
     public function setFormat($format);
10 11
 
11 12
     /**
12 13
      * @param bool $returnOnlyCompleteData
14
+     * @return void
13 15
      */
14 16
     public function setReturnOnlyCompleteData($returnOnlyCompleteData);
15 17
 
16 18
     /**
17 19
      * @param string $language (See BingAds SDK documentation)
20
+     * @return void
18 21
      */
19 22
     public function setReportLanguage($language);
20 23
 
21 24
     /**
22
-     * @return mixed
25
+     * @return \BingAds\Reporting\ReportRequest
23 26
      */
24 27
     public function getRequest();
25 28
 }
Please login to merge, or discard this patch.
Tests/Api/ClientTest.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@  discard block
 block discarded – undo
11 11
 use Mockery;
12 12
 use PHPUnit_Framework_TestCase;
13 13
 use SoapFault;
14
-use stdClass;
15 14
 use Symfony\Component\Filesystem\Filesystem;
16 15
 use Werkspot\BingAdsApiBundle\Api\Client;
17 16
 use Werkspot\BingAdsApiBundle\Api\Exceptions;
@@ -20,6 +19,7 @@  discard block
 block discarded – undo
20 19
 use Werkspot\BingAdsApiBundle\Guzzle\OauthTokenService;
21 20
 use Werkspot\BingAdsApiBundle\Model\AccessToken;
22 21
 use Werkspot\BingAdsApiBundle\Model\ApiDetails;
22
+use stdClass;
23 23
 
24 24
 class GeoLocationPerformanceReportTest extends PHPUnit_Framework_TestCase
25 25
 {
Please login to merge, or discard this patch.