Skip to content

Commit 21c2ffc

Browse files
committed
Remove unused parent function calls from Test API.
1 parent 6affaca commit 21c2ffc

File tree

4 files changed

+1
-71
lines changed

4 files changed

+1
-71
lines changed

tests/src/MailchimpAutomations.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ public function getEndpoint() {
3232
* @inheritdoc
3333
*/
3434
public function getAutomations($parameters = []) {
35-
parent::getAutomations($parameters);
36-
3735
$response = (object) [
3836
'automations' => [
3937
(object) [
@@ -59,7 +57,6 @@ public function getAutomations($parameters = []) {
5957
* @inheritdoc
6058
*/
6159
public function getWorkflow($workflow_id) {
62-
parent::getWorkflow($workflow_id);
6360
$response = (object) [
6461
'id' => 'eb4c82c9d2',
6562
'create_time' => '2015-07-23T15:15:00+00:00',
@@ -75,8 +72,6 @@ public function getWorkflow($workflow_id) {
7572
* @inheritdoc
7673
*/
7774
public function getWorkflowEmails($workflow_id) {
78-
parent::getWorkflowEmails($workflow_id);
79-
8075
$response = (object) [
8176
'emails' => [
8277
(object) [
@@ -99,8 +94,6 @@ public function getWorkflowEmails($workflow_id) {
9994
* @inheritdoc
10095
*/
10196
public function getWorkflowEmail($workflow_id,$workflow_email_id) {
102-
parent::getWorkflowEmail($workflow_id, $workflow_email_id);
103-
10497
$response = (object) [
10598
'id' => 'a87de7d1e5',
10699
'workflow_id' => '57afe96172',
@@ -118,8 +111,6 @@ public function getWorkflowEmail($workflow_id,$workflow_email_id) {
118111
* @inheritdoc
119112
*/
120113
public function getWorkflowEmailSubscribers($workflow_id, $workflow_email_id) {
121-
parent::getWorkflowEmailSubscribers($workflow_id, $workflow_email_id);
122-
123114
$response = (object) [
124115
'workflow_id' => '4e3da78a41',
125116
'email_id' => 'a87de7d1e5',
@@ -134,8 +125,6 @@ public function getWorkflowEmailSubscribers($workflow_id, $workflow_email_id) {
134125
* @inheritdoc
135126
*/
136127
public function getWorkflowEmailSubscriber($workflow_id, $workflow_email_id, $email) {
137-
parent::getWorkflowEmailSubscriber($workflow_id, $workflow_email_id, $email);
138-
139128
$response = (object) [
140129
'id' => md5(strtolower($email)),
141130
'workflow_id' => '4e3da78a41',

tests/src/MailchimpCampaigns.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ public function getEndpoint() {
3737
* @inheritdoc
3838
*/
3939
public function getCampaign($campaign_id, $parameters = []) {
40-
parent::getCampaign($campaign_id, $parameters);
41-
4240
$response = (object) [
4341
'id' => $campaign_id,
4442
'type' => 'regular',

tests/src/MailchimpEcommerce.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,13 @@ public function getEndpoint() {
6060
* @inheritdoc
6161
*/
6262
public function getStore($store_id, $parameters = []) {
63-
parent::getStore($store_id, $parameters);
64-
6563
return (isset($this->stores[$store_id])) ? $this->stores[$store_id] : NULL;
6664
}
6765

6866
/**
6967
* @inheritdoc
7068
*/
7169
public function addStore($id, $store, $parameters = [], $batch = FALSE) {
72-
parent::addStore($id, $store, $batch);
73-
7470
$parameters = [
7571
'id' => $id,
7672
];
@@ -83,8 +79,6 @@ public function addStore($id, $store, $parameters = [], $batch = FALSE) {
8379
* @inheritdoc
8480
*/
8581
public function getCustomer($store_id, $customer_id, $parameters = []) {
86-
parent::getCustomer($store_id, $customer_id, $parameters);
87-
8882
if (isset($this->customers[$store_id])) {
8983
return (isset($this->customers[$store_id][$customer_id])) ? $this->customers[$store_id][$customer_id] : NULL;
9084
}
@@ -96,8 +90,6 @@ public function getCustomer($store_id, $customer_id, $parameters = []) {
9690
* @inheritdoc
9791
*/
9892
public function addCustomer($store_id, $customer, $batch = FALSE) {
99-
parent::addCustomer($store_id, $customer, $batch);
100-
10193
if (!isset($this->customers[$store_id])) {
10294
$this->customers[$store_id] = [];
10395
}
@@ -109,8 +101,6 @@ public function addCustomer($store_id, $customer, $batch = FALSE) {
109101
* @inheritdoc
110102
*/
111103
public function getOrder($store_id, $order_id, $parameters = []) {
112-
parent::getOrder($store_id, $order_id, $parameters);
113-
114104
if (isset($this->orders[$store_id])) {
115105
return (isset($this->orders[$store_id][$order_id])) ? $this->orders[$store_id][$order_id] : NULL;
116106
}
@@ -122,8 +112,6 @@ public function getOrder($store_id, $order_id, $parameters = []) {
122112
* @inheritdoc
123113
*/
124114
public function addOrder($store_id, $id, array $customer, array $order, $batch = FALSE) {
125-
parent::addOrder($store_id, $id, $customer, $order, $batch);
126-
127115
if (empty($store_id)) {
128116
throw new MailchimpAPIException('Store ID cannot be empty.');
129117
}

tests/src/MailchimpLists.php

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ public function getEndpoint() {
3737
* @inheritdoc
3838
*/
3939
public function getLists($parameters = []) {
40-
parent::getLists($parameters);
41-
4240
$response = (object) [
4341
'lists' => [
4442
(object) [
@@ -64,8 +62,6 @@ public function getLists($parameters = []) {
6462
* @inheritdoc
6563
*/
6664
public function getList($list_id, $parameters = []) {
67-
parent::getList($list_id, $parameters);
68-
6965
$response = (object) [
7066
'id' => $list_id,
7167
'name' => 'Test List One',
@@ -78,8 +74,6 @@ public function getList($list_id, $parameters = []) {
7874
* @inheritdoc
7975
*/
8076
public function getInterestCategories($list_id, $parameters = []) {
81-
parent::getInterestCategories($list_id, $parameters);
82-
8377
$response = (object) [
8478
'list_id' => $list_id,
8579
'categories' => [
@@ -99,8 +93,6 @@ public function getInterestCategories($list_id, $parameters = []) {
9993
* @inheritdoc
10094
*/
10195
public function addInterestCategories($list_id, $title, $type, $parameters = [], $batch = FALSE) {
102-
parent::addInterestCategories($list_id, $title, $type, $parameters = [], $batch = FALSE);
103-
10496
$response = (object) [
10597
'list_id' => $list_id,
10698
'id' => 'a1e9f4b7f6',
@@ -115,8 +107,6 @@ public function addInterestCategories($list_id, $title, $type, $parameters = [],
115107
* @inheritdoc
116108
*/
117109
public function updateInterestCategories($list_id, $interest_category_id, $title, $type, $parameters = [], $batch = FALSE) {
118-
parent::updateInterestCategories($list_id, $interest_category_id, $title, $type, $parameters = [], $batch = FALSE);
119-
120110
$response = (object) [
121111
'list_id' => $list_id,
122112
'id' => 'a1e9f4b7f6',
@@ -132,17 +122,13 @@ public function updateInterestCategories($list_id, $interest_category_id, $title
132122
* @inheritdoc
133123
*/
134124
public function deleteInterestCategories($list_id, $interest_category_id, $parameters = [], $batch = FALSE) {
135-
parent::deleteInterestCategories($list_id, $interest_category_id, $parameters = [], $batch = FALSE);
136-
137125
return (!empty($list_id) && !empty($interest_category_id));
138126
}
139127

140128
/**
141129
* @inheritdoc
142130
*/
143131
public function getInterests($list_id, $interest_category_id, $parameters = []) {
144-
parent::getInterests($list_id, $interest_category_id, $parameters);
145-
146132
$response = (object) [
147133
'interests' => [
148134
(object) [
@@ -162,8 +148,6 @@ public function getInterests($list_id, $interest_category_id, $parameters = [])
162148
* @inheritdoc
163149
*/
164150
public function addInterests($list_id, $interest_category_id, $name, $parameters = [], $batch = FALSE) {
165-
parent::addInterests($list_id, $interest_category_id, $name, $parameters = [], $batch = FALSE);
166-
167151
$response = (object) [
168152
'list_id' => $list_id,
169153
'category_id' => $interest_category_id,
@@ -178,8 +162,6 @@ public function addInterests($list_id, $interest_category_id, $name, $parameters
178162
* @inheritdoc
179163
*/
180164
public function updateInterests($list_id, $interest_category_id, $interest_id, $name, $parameters = [], $batch = FALSE) {
181-
parent::updateInterests($list_id, $interest_category_id, $interest_id, $name, $parameters = [], $batch = FALSE);
182-
183165
$response = (object) [
184166
'list_id' => $list_id,
185167
'category_id' => $interest_category_id,
@@ -194,17 +176,13 @@ public function updateInterests($list_id, $interest_category_id, $interest_id, $
194176
* @inheritdoc
195177
*/
196178
public function deleteInterests($list_id, $interest_category_id, $interest_id, $parameters = [], $batch = FALSE) {
197-
parent::deleteInterests($list_id, $interest_category_id, $interest_id, $parameters = [], $batch = FALSE);
198-
199179
return (!empty($list_id) && !empty($interest_category_id) && !empty($interest_id));
200180
}
201181

202182
/**
203183
* @inheritdoc
204184
*/
205185
public function getMergeFields($list_id, $parameters = []) {
206-
parent::getMergeFields($list_id, $parameters);
207-
208186
$response = (object) [
209187
'merge_fields' => [
210188
(object) [
@@ -242,7 +220,6 @@ public function getMergeFields($list_id, $parameters = []) {
242220
* @inheritdoc
243221
*/
244222
public function getMemberInfo($list_id, $email, $parameters = []) {
245-
parent::getMemberInfo($list_id, $email, $parameters);
246223

247224
$response = (object) [
248225
'id' => md5(strtolower($email)),
@@ -257,8 +234,6 @@ public function getMemberInfo($list_id, $email, $parameters = []) {
257234
* @inheritdoc
258235
*/
259236
public function addMember($list_id, $email, $parameters = [], $batch = FALSE) {
260-
parent::addMember($list_id, $email, $parameters, $batch);
261-
262237
$response = (object) [
263238
'id' => md5(strtolower($email)),
264239
'email_address' => $email,
@@ -274,16 +249,12 @@ public function addMember($list_id, $email, $parameters = [], $batch = FALSE) {
274249
/**
275250
* @inheritdoc
276251
*/
277-
public function removeMember($list_id, $email) {
278-
parent::removeMember($list_id, $email);
279-
}
252+
public function removeMember($list_id, $email) {}
280253

281254
/**
282255
* @inheritdoc
283256
*/
284257
public function updateMember($list_id, $email, $parameters = [], $batch = FALSE) {
285-
parent::updateMember($list_id, $email, $parameters, $batch);
286-
287258
$response = (object) [
288259
'id' => md5(strtolower($email)),
289260
'email_address' => $email,
@@ -300,8 +271,6 @@ public function updateMember($list_id, $email, $parameters = [], $batch = FALSE)
300271
* @inheritdoc
301272
*/
302273
public function addOrUpdateMember($list_id, $email, $parameters = [], $batch = FALSE) {
303-
parent::addOrUpdateMember($list_id, $email, $parameters, $batch);
304-
305274
$response = (object) [
306275
'id' => md5(strtolower($email)),
307276
'email_address' => $email,
@@ -318,8 +287,6 @@ public function addOrUpdateMember($list_id, $email, $parameters = [], $batch = F
318287
* @inheritdoc
319288
*/
320289
public function getSegments($list_id, $parameters = []) {
321-
parent::getSegments($list_id, $parameters);
322-
323290
$response = (object) [
324291
'segments' => [
325292
(object) [
@@ -345,8 +312,6 @@ public function getSegments($list_id, $parameters = []) {
345312
* @inheritdoc
346313
*/
347314
public function getSegment($list_id, $segment_id, $parameters = []) {
348-
parent::getSegment($list_id, $segment_id, $parameters);
349-
350315
$response = (object) [
351316
'id' => 49377,
352317
'name' => 'Test Segment One',
@@ -361,8 +326,6 @@ public function getSegment($list_id, $segment_id, $parameters = []) {
361326
* @inheritdoc
362327
*/
363328
public function addSegment($list_id, $name, $parameters = [], $batch = FALSE) {
364-
parent::addSegment($list_id, $name, $parameters, $batch);
365-
366329
$response = (object) [];
367330

368331
if (!empty($list_id) && !empty($name) && !empty($parameters['type'])) {
@@ -379,8 +342,6 @@ public function addSegment($list_id, $name, $parameters = [], $batch = FALSE) {
379342
* @inheritdoc
380343
*/
381344
public function updateSegment($list_id, $segment_id, $name, $parameters = [], $batch = FALSE) {
382-
parent::updateSegment($list_id, $segment_id, $name, $parameters);
383-
384345
$response = (object) [
385346
'id' => $segment_id,
386347
'name' => $name,
@@ -395,8 +356,6 @@ public function updateSegment($list_id, $segment_id, $name, $parameters = [], $b
395356
* @inheritdoc
396357
*/
397358
public function getWebhooks($list_id, $parameters = []) {
398-
parent::getWebhooks($list_id, $parameters);
399-
400359
$response = (object) [
401360
'webhooks' => [
402361
(object) [
@@ -423,8 +382,6 @@ public function getWebhooks($list_id, $parameters = []) {
423382
* @inheritdoc
424383
*/
425384
public function addWebhook($list_id, $url, $parameters = [], $batch = FALSE) {
426-
parent::addWebhook($list_id, $url, $parameters, $batch);
427-
428385
$response = (object) [
429386
'id' => 'ab24521a00',
430387
'url' => $url,
@@ -442,8 +399,6 @@ public function addWebhook($list_id, $url, $parameters = [], $batch = FALSE) {
442399
* @inheritdoc
443400
*/
444401
public function deleteWebhook($list_id, $webhook_id, $parameters = []) {
445-
parent::deleteWebhook($list_id, $webhook_id, $parameters);
446-
447402
return (!empty($list_id) && !empty($webhook_id));
448403
}
449404

0 commit comments

Comments
 (0)