Skip to content

Commit 246da3d

Browse files
authored
Apply fixes from StyleCI (#70)
1 parent 082825d commit 246da3d

File tree

5 files changed

+34
-35
lines changed

5 files changed

+34
-35
lines changed

src/OneSignal.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use GuzzleHttp\Client;
66
use GuzzleHttp\Exception\RequestException;
7-
use GuzzleHttp\Message\Response;
87
use OneSignal\Exception\OneSignalException;
98

109
/**

tests/OneSignal/Tests/AppsTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function testGetAll()
6767
'safari_icon_128_128' => 'http://onesignal.com/safari_packages/92911750-242d-4260-9e00-9d9034f139ce/128x128.png',
6868
'safari_icon_256_256' => 'http://onesignal.com/safari_packages/92911750-242d-4260-9e00-9d9034f139ce/[email protected]',
6969
'site_name' => 'The URL to your website for Web Push',
70-
'basic_auth_key' => 'NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj'
70+
'basic_auth_key' => 'NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj',
7171
],
7272
[
7373
'id' => 'e4e87830-b954-11e3-811d-f3b376925f15',
@@ -93,8 +93,8 @@ public function testGetAll()
9393
'safari_icon_128_128' => 'http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/128x128.png',
9494
'safari_icon_256_256' => 'http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/[email protected]',
9595
'site_name' => 'The URL to your website for Web Push',
96-
'basic_auth_key' => 'NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj'
97-
]
96+
'basic_auth_key' => 'NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj',
97+
],
9898
];
9999

100100
$oneSignal = $this->getMockedOneSignal();
@@ -141,7 +141,7 @@ public function testAdd()
141141
'safari_icon_128_128' => 'http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/128x128.png',
142142
'safari_icon_256_256' => 'http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/[email protected]',
143143
'site_name' => 'The URL to your website for Web Push',
144-
'basic_auth_key' => 'NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj'
144+
'basic_auth_key' => 'NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj',
145145
];
146146

147147
$oneSignal = $this->getMockedOneSignal();
@@ -152,7 +152,7 @@ public function testAdd()
152152
'Authorization' => 'Basic ' . $oneSignal->getConfig()->getUserAuthKey(),
153153
'Content-Type' => 'application/json',
154154
],
155-
'json' => $postData
155+
'json' => $postData,
156156
])
157157
->willReturn($returnData);
158158

@@ -194,7 +194,7 @@ public function testUpdate()
194194
'safari_icon_128_128' => 'http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/128x128.png',
195195
'safari_icon_256_256' => 'http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/[email protected]',
196196
'site_name' => 'The URL to your website for Web Push',
197-
'basic_auth_key' => 'NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj'
197+
'basic_auth_key' => 'NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj',
198198
];
199199

200200
$oneSignal = $this->getMockedOneSignal();
@@ -205,7 +205,7 @@ public function testUpdate()
205205
'Authorization' => 'Basic ' . $oneSignal->getConfig()->getUserAuthKey(),
206206
'Content-Type' => 'application/json',
207207
],
208-
'json' => $postData
208+
'json' => $postData,
209209
])
210210
->willReturn($returnData);
211211

tests/OneSignal/Tests/DevicesTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function testGetOne()
2323
'amount_spent' => 0.0,
2424
'created_at' => 1395096859,
2525
'invalid_identifier' => false,
26-
'badge_count' => 0
26+
'badge_count' => 0,
2727
];
2828

2929
$oneSignal = $this->getMockedOneSignal();
@@ -102,7 +102,7 @@ public function testAdd()
102102
'headers' => [
103103
'Content-Type' => 'application/json',
104104
],
105-
'json' => $postData
105+
'json' => $postData,
106106
])
107107
->willReturn($returnData);
108108

@@ -138,7 +138,7 @@ public function testUpdate()
138138
'headers' => [
139139
'Content-Type' => 'application/json',
140140
],
141-
'json' => $postData
141+
'json' => $postData,
142142
])
143143
->willReturn($returnData);
144144

@@ -167,7 +167,7 @@ public function testOnSession()
167167
'headers' => [
168168
'Content-Type' => 'application/json',
169169
],
170-
'json' => $postData
170+
'json' => $postData,
171171
])
172172
->willReturn($returnData);
173173

@@ -199,7 +199,7 @@ public function testOnPurchase()
199199
'headers' => [
200200
'Content-Type' => 'application/json',
201201
],
202-
'json' => $postData
202+
'json' => $postData,
203203
])
204204
->willReturn($returnData);
205205

@@ -226,7 +226,7 @@ public function testOnFocus()
226226
'headers' => [
227227
'Content-Type' => 'application/json',
228228
],
229-
'json' => $postData
229+
'json' => $postData,
230230
])
231231
->willReturn($returnData);
232232

@@ -238,7 +238,7 @@ public function testOnFocus()
238238
public function testCsvExport()
239239
{
240240
$data = [
241-
'csv_file_url' => 'https://onesignal.com/csv_exports/b2f7f966-d8cc-11e4-bed1-df8f05be55ba/users_184948440ec0e334728e87228011ff41_2015-11-10.csv.gz'
241+
'csv_file_url' => 'https://onesignal.com/csv_exports/b2f7f966-d8cc-11e4-bed1-df8f05be55ba/users_184948440ec0e334728e87228011ff41_2015-11-10.csv.gz',
242242
];
243243

244244
$oneSignal = $this->getMockedOneSignal();

tests/OneSignal/Tests/NotificationsTest.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ class NotificationsTest extends TestCase
99
public function testGetOne()
1010
{
1111
$data = [
12-
'id' => "481a2734-6b7d-11e4-a6ea-4b53294fa671",
12+
'id' => '481a2734-6b7d-11e4-a6ea-4b53294fa671',
1313
'successful' => 15,
1414
'failed' => 1,
1515
'converted' => 3,
1616
'remaining' => 0,
1717
'queued_at' => 1415914655,
1818
'send_after' => 1415914655,
19-
'url' => "https://yourWebsiteToOpen.com",
19+
'url' => 'https://yourWebsiteToOpen.com',
2020
'data' => [
2121
'foo' => 'bar',
22-
'your' => 'custom metadata'
22+
'your' => 'custom metadata',
2323
],
2424
'canceled' => false,
2525
'headings' => [
2626
'en' => 'English and default langauge heading',
27-
'es' => 'Spanish language heading'
27+
'es' => 'Spanish language heading',
2828
],
2929
'contents' => [
3030
'en' => 'English language content',
31-
'es' => 'Hola'
32-
]
31+
'es' => 'Hola',
32+
],
3333
];
3434

3535
$oneSignal = $this->getMockedOneSignal();
@@ -63,12 +63,12 @@ public function testGetAll()
6363
'data' => null,
6464
'headings' => [
6565
'en' => 'English and default langauge heading',
66-
'es' => 'Spanish language heading'
66+
'es' => 'Spanish language heading',
6767
],
6868
'contents' => [
6969
'en' => 'English and default content',
70-
'es' => 'Hola'
71-
]
70+
'es' => 'Hola',
71+
],
7272
],
7373
[
7474
'id' => 'b6b326a8-40aa-13e5-b91b-bf8bc3fa26f7',
@@ -82,18 +82,18 @@ public function testGetAll()
8282
'url' => null,
8383
'data' => [
8484
'foo' => 'bar',
85-
'your' => 'custom metadata'
85+
'your' => 'custom metadata',
8686
],
8787
'headings' => [
8888
'en' => 'English and default langauge heading',
89-
'es' => 'Spanish language heading'
89+
'es' => 'Spanish language heading',
9090
],
9191
'contents' => [
9292
'en' => 'English and default content',
93-
'es' => 'Hola'
94-
]
95-
]
96-
]
93+
'es' => 'Hola',
94+
],
95+
],
96+
],
9797
];
9898

9999
$oneSignal = $this->getMockedOneSignal();
@@ -145,7 +145,7 @@ public function testSendToAllSubscribers()
145145
'Authorization' => 'Basic app_auth',
146146
'Content-Type' => 'application/json',
147147
],
148-
'json' => $postData
148+
'json' => $postData,
149149
])
150150
->willReturn($returnData);
151151

@@ -174,7 +174,7 @@ public function testSendBasedOnFilters()
174174
[
175175
'field' => 'amount_spent',
176176
'relation' => '>',
177-
'value' => '0'
177+
'value' => '0',
178178
],
179179
],
180180
];
@@ -192,7 +192,7 @@ public function testSendBasedOnFilters()
192192
'Authorization' => 'Basic app_auth',
193193
'Content-Type' => 'application/json',
194194
],
195-
'json' => $postData
195+
'json' => $postData,
196196
])
197197
->willReturn($returnData);
198198

@@ -220,7 +220,7 @@ public function testOpen()
220220
'Authorization' => 'Basic app_auth',
221221
'Content-Type' => 'application/json',
222222
],
223-
'json' => $postData
223+
'json' => $postData,
224224
])
225225
->willReturn($returnData);
226226

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22

3-
$loader = require __DIR__.'/../vendor/autoload.php';
3+
$loader = require __DIR__ . '/../vendor/autoload.php';
44
$loader->add('OneSignal\Tests', __DIR__);
55
$loader->register();

0 commit comments

Comments
 (0)