Skip to content

Commit 1bb5210

Browse files
committed
Code style
1 parent ec9eb58 commit 1bb5210

File tree

81 files changed

+90
-162
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+90
-162
lines changed

Diff for: Tests/HydrateTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function testHydration() : void
6666
$this->assertEquals('d5e4dc88-9dbf-11ef-9af2-fa163e4d7501', "{$contacts->contacts[0]->contact_id}");
6767
$this->assertEquals('[email protected]', $contacts->contacts[0]->email_address->address);
6868
$this->assertEquals('[email protected]', $contacts->contacts[1]->email_address->address);
69-
$time = new \PHPFUI\ConstantContact\DateTime("2024-11-08T10:54:32Z");
69+
$time = new \PHPFUI\ConstantContact\DateTime('2024-11-08T10:54:32Z');
7070
$this->assertEquals((string)$time, (string)$contacts->contacts[0]->created_at);
7171
$this->assertEquals((string)$time, (string)$contacts->contacts[1]->created_at);
7272
$newJson = $contacts->getJSON();

Diff for: composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"spatie/guzzle-rate-limiter-middleware": "^2.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "<12.0",
20+
"phpunit/phpunit": "<=12.0",
2121
"gitonomy/gitlib": ">=1.2",
2222
"phpfui/phpunit-syntax-coverage": "^1.0",
2323
"roave/security-advisories": "dev-latest",

Diff for: src/ConstantContact/Definition/ActivityDeleteListResponse.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
/**
88
* @property \PHPFUI\ConstantContact\UUID $activity_id Unique ID for the delete list batch job.
99
* @property string $state The state of the request:
10-
<p><ul>
11-
<li>initialized - request has been received</li>
12-
<li>processing - request is being processed</li>
13-
<li>completed - job completed</li>
14-
<li>cancelled - request was cancelled</li>
15-
<li>failed - job failed to complete</li>
16-
<li>timed_out - the request timed out before completing"</li>
10+
* <p><ul>
11+
* <li>initialized - request has been received</li>
12+
* <li>processing - request is being processed</li>
13+
* <li>completed - job completed</li>
14+
* <li>cancelled - request was cancelled</li>
15+
* <li>failed - job failed to complete</li>
16+
* <li>timed_out - the request timed out before completing"</li>
1717
* </ul> </p>
1818
* @property \PHPFUI\ConstantContact\DateTime $created_at Date and time that the request was received, in ISO-8601 format.
1919
* @property \PHPFUI\ConstantContact\DateTime $updated_at Date and time that the request status was updated, in ISO-8601 format.

Diff for: src/ConstantContact/Definition/ActivityExportStatus.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
/**
88
* @property \PHPFUI\ConstantContact\UUID $activity_id Unique ID for the activity.
99
* @property string $state <p> The state of the request: <ul>
10-
<li>initialized - request has been received</li>
11-
<li>processing - request is being processed</li>
12-
<li>completed - job completed</li>
13-
<li>cancelled - request was cancelled</li>
14-
<li>failed - job failed to complete</li>
15-
<li>timed_out - the request timed out before completing"</li>
16-
</ul> </p>
10+
* <li>initialized - request has been received</li>
11+
* <li>processing - request is being processed</li>
12+
* <li>completed - job completed</li>
13+
* <li>cancelled - request was cancelled</li>
14+
* <li>failed - job failed to complete</li>
15+
* <li>timed_out - the request timed out before completing"</li>
16+
* </ul> </p>
1717
* @property \PHPFUI\ConstantContact\DateTime $started_at Timestamp showing when we began processing the activity request, in ISO-8601 format.
1818
* @property \PHPFUI\ConstantContact\DateTime $completed_at Timestamp showing when we completed processing the activity, in ISO-8601 format.
1919
* @property \PHPFUI\ConstantContact\DateTime $created_at Timestamp showing when we created the activity, in ISO-8601 format.

Diff for: src/ConstantContact/Definition/ActivityImport.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
/**
88
* @property \PHPFUI\ConstantContact\UUID $activity_id Unique ID for the activity.
99
* @property string $state The state of the request:
10-
<p><ul>
11-
* <li>initialized - request has been received</li>
10+
* <p><ul>
11+
* <li>initialized - request has been received</li>
1212
* <li>processing - request is being processed</li>
1313
* <li>completed - job completed</li>
1414
* <li>cancelled - request was cancelled</li>

Diff for: src/ConstantContact/Definition/EmailSendHistory.php

+14-14
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@
1010
* @property array $segment_ids The contact segments that Constant Contact sent the email campaign activity to as an array of <code>segment_id</code> integers.
1111
* @property int $count The number of contacts that Constant Contact sent this email campaign activity to. This property is specific to each send history object. When you resend an email campaign activity, Constant Contact only sends it to new contacts in the contact lists or segments you are using.
1212
* @property \PHPFUI\ConstantContact\DateTime $run_date The system generated date and time that Constant Contact sent the email campaign activity to contacts in ISO-8601 format.
13-
* @property string $send_status The send status for the email campaign activity. Valid values are: <ul>
13+
* @property string $send_status The send status for the email campaign activity. Valid values are: <ul>
1414
* <li><code>COMPLETED</code>: Constant Contact successfully sent the email campaign activity.</li>
1515
* <li><code>ERRORED</code>: Constant Contact encountered an error when sending the email campaign activity.<li> * </ul>
1616
* @property int $reason_code The reason why the send attempt completed or encountered an error. This method returns <code>0</code> if Constant Contact successfully sent the email campaign activity to contacts. Possible <code>reason_code</code> values are: <ul>
17-
* <li>0 — Constant Contact successfully sent the email to contacts.</li>
18-
* <li>1 — An error occurred when sending this email. Try scheduling it again, or contact <a href='http://support.constantcontact.com' target='_blank'>Customer Support</a>.</li>
19-
* <li>2 — We were unable to send the email. Please contact our <a href='http://knowledgebase.constantcontact.com/articles/KnowledgeBase/5782-contact-an-account-review-and-deliverability-specialist' target='_blank'>Account Review Team</a> for more information.</li>
20-
* <li>3 — This Constant Contact account cannot currently send emails. This can be due to billing or product expiration.</li>
21-
* <li>4 — You're not able to send the email to that many contacts. Remove contacts from the contact lists you are using or select a list with fewer contacts.</li>
22-
* <li>5 — The email is currently in staging. For more information, see the <a href='http://knowledgebase.constantcontact.com/articles/KnowledgeBase/7402-email-staging' target='_blank>Email Staging Knowledge Base article</a>.</li>
23-
* <li>6 — Constant Contact was unable to finish sending this email to all of the contacts on your list. Please contact <a href='http://support.constantcontact.com' target='_blank'>Customer Support</a> for more information.</li>
24-
* <li>7 — The email contains invalid images. This can be caused when one or more images in the email are longer available in your image library.</li>
25-
* <li>8 — The email contains a link URL that exceeds 1005 characters.</li>
26-
* <li>9 — Constant Contact was unable to verify your authenticated Sender address. Please contact <a href='http://support.constantcontact.com' target='_blank'>Customer Support</a> for more information.</li>
27-
* <li>10 — Constant Contact was unable to verify your authenticated Sender address. Please contact <a href='http://support.constantcontact.com' target='_blank'>Customer Support</a> for more information.</li>
28-
* <li>11 — This Constant Contact account cannot send survey invitations.</li>
29-
* <li>12 — Constant Contact attempted to send the email, but there were no eligible contacts to send it to. This can be caused by an invalid contact list, a contact list with no contacts, or a contact list with no new contacts during a resend. This method displays <code>reason_code</code> 12 as a send attempt with a <code>send_status</code> of COMPLETED and a <code>count</code> of 0.</li> * </ul>
17+
* <li>0 — Constant Contact successfully sent the email to contacts.</li>
18+
* <li>1 — An error occurred when sending this email. Try scheduling it again, or contact <a href='http://support.constantcontact.com' target='_blank'>Customer Support</a>.</li>
19+
* <li>2 — We were unable to send the email. Please contact our <a href='http://knowledgebase.constantcontact.com/articles/KnowledgeBase/5782-contact-an-account-review-and-deliverability-specialist' target='_blank'>Account Review Team</a> for more information.</li>
20+
* <li>3 — This Constant Contact account cannot currently send emails. This can be due to billing or product expiration.</li>
21+
* <li>4 — You're not able to send the email to that many contacts. Remove contacts from the contact lists you are using or select a list with fewer contacts.</li>
22+
* <li>5 — The email is currently in staging. For more information, see the <a href='http://knowledgebase.constantcontact.com/articles/KnowledgeBase/7402-email-staging' target='_blank>Email Staging Knowledge Base article</a>.</li>
23+
* <li>6 — Constant Contact was unable to finish sending this email to all of the contacts on your list. Please contact <a href='http://support.constantcontact.com' target='_blank'>Customer Support</a> for more information.</li>
24+
* <li>7 — The email contains invalid images. This can be caused when one or more images in the email are longer available in your image library.</li>
25+
* <li>8 — The email contains a link URL that exceeds 1005 characters.</li>
26+
* <li>9 — Constant Contact was unable to verify your authenticated Sender address. Please contact <a href='http://support.constantcontact.com' target='_blank'>Customer Support</a> for more information.</li>
27+
* <li>10 — Constant Contact was unable to verify your authenticated Sender address. Please contact <a href='http://support.constantcontact.com' target='_blank'>Customer Support</a> for more information.</li>
28+
* <li>11 — This Constant Contact account cannot send survey invitations.</li>
29+
* <li>12 — Constant Contact attempted to send the email, but there were no eligible contacts to send it to. This can be caused by an invalid contact list, a contact list with no contacts, or a contact list with no new contacts during a resend. This method displays <code>reason_code</code> 12 as a send attempt with a <code>send_status</code> of COMPLETED and a <code>count</code> of 0.</li> * </ul>
3030
*/
3131
class EmailSendHistory extends \PHPFUI\ConstantContact\Definition\Base
3232
{

Diff for: src/ConstantContact/Definition/PlanInfo.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
* @property string $plan_type Use this property to update the client account billing plan to a different billing plan. After changing the <code>plan_type</code> from <code>TRIAL</code> to any other billing plan type, you cannot change it back to <code>TRIAL</code>.
99
* <ul>
1010
* <li><code>TRIAL</code>: A non-billable account with an expiration date that allows clients to try Constant Contact product features.</li>
11-
* <li><code>GOLD</code>: A billable client account plan.</li>
12-
* <li><code>SILVER</code>: A billable client account plan.</li>
13-
* <li><code>BRONZE</code>: A billable client account plan.</li>
11+
* <li><code>GOLD</code>: A billable client account plan.</li>
12+
* <li><code>SILVER</code>: A billable client account plan.</li>
13+
* <li><code>BRONZE</code>: A billable client account plan.</li>
1414
* </ul>
1515
* @property int $plan_group_id Updates an existing client account billing plan group to a new billing plan group. If you don't know the `plan_group_id` to use, contact our API support team.
1616
* @property int $billing_day_of_month This property is required if a client account is not set up to use single billing. You can choose to enter a specific day of the month or accept the default value, which is the day on which the <code>plan_type</code> value changes from a <code>TRIAL</code> plan to a different <code>plan_type</code>. For trial accounts, the value defaults to null. You can only change the <code>billing_day_of_month</code> when changing the <code>plan_type</code> value from <code>TRIAL</code> to a different <code>plan_type</code>, otherwise the value you enter is ignored.

Diff for: src/ConstantContact/Definition/PlanTiersObject.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* @property string $plan_type The billing plan that is associated with a client's Constant Contact account. The billing plan determines which Constant Contact product features that the client account can access. If you are not on the latest billing plan, contact the Constant Contact Partner Team. However, older billing plans and <code>plan_type</code> enum values will continue to be supported. <ul>
99
* <li><code>TRIAL</code>: Provides limited product features for a non-billed account and the account has an expiration date.</li>
10-
* <li><code>BRONZE</code>: Billable plan that provides basic email and marketing tools.</li>
10+
* <li><code>BRONZE</code>: Billable plan that provides basic email and marketing tools.</li>
1111
* <li><code>SILVER</code>: Billable plan that provides all features available in the <code>BRONZE</code> plan, and adds some additional email campaign to features, such as contact segmentation and social media ads integration.</li>
1212
* <li><code>GOLD</code>: Billable plan that provides all available product features.</li> * </ul>
1313
* @property array<\PHPFUI\ConstantContact\Definition\TierObject> $current_tiers Lists the billing plan tiers that are currently associated with a client account.

Diff for: src/ConstantContact/Definition/TrackingActivitySmsChannelDTO.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
* @property string $country_code The ISO country code that is associated with SMS address.
99
* @property string $state The SMS channel status:
1010
* <ul><li><code>N</code>: not_set<li>
11-
* <li><code>T</code>: temp_hold<li>
12-
* <li><code>P</code>: pending_confirmation<li>
13-
* <li><code>I</code>: implicit<li>
14-
* <li><code>E</code>: explicit<li>
15-
* <li><code>O</code>: unsubscribed<li>
16-
* <li><code>D</code>:deprecated<li></ul>
11+
* <li><code>T</code>: temp_hold<li>
12+
* <li><code>P</code>: pending_confirmation<li>
13+
* <li><code>I</code>: implicit<li>
14+
* <li><code>E</code>: explicit<li>
15+
* <li><code>O</code>: unsubscribed<li>
16+
* <li><code>D</code>:deprecated<li></ul>
1717
* @property string $formatted_international The formatted SMS number returned if the SMS <code>country_code</code> does not match the contacts <code>country_code</code>.
1818
* @property string $formatted_national The formatted SMS number returned if the SMS <code>country_code</code> matches the contacts <code>country_code</code>.
1919
*/

Diff for: src/ConstantContact/V3/Account/Emails.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(\PHPFUI\ConstantContact\Client $client)
2828
*
2929
*
3030
* @param string $confirm_status Use the `confirm_status` query parameter to search for account emails using the email status. Possible values are `CONFIRMED` or `UNCONFIRMED`. You can also abbreviate the values of this query parameter and use `C` or `U`.
31-
31+
*
3232
* @param string $role_code Use the `role_code` query parameter to search for account emails that have a specific role. Each each email address in an account can have multiple roles or no role. Possible values are `CONTACT`, `BILLING`, `REPLY_TO`, `JOURNALING`, or `OTHER`. You can also abbreviate the value of this query parameter and use `C`,`B`,`R`,`J`, or `O`.
3333
* @param string $email_address Use the `email_address` query parameter to search for a specific account email address.
3434
*/
@@ -57,18 +57,21 @@ public function get(?string $confirm_status = null, ?string $role_code = null, ?
5757

5858
return $this->doGet(['confirm_status' => $confirm_status, 'role_code' => $role_code, 'email_address' => $email_address, ]);
5959
}
60+
6061
/**
6162
* @return ?array<\PHPFUI\ConstantContact\Definition\AccountEmails>
6263
*/
6364
public function getTyped(?string $confirm_status = null, ?string $role_code = null, ?string $email_address = null) : ?array
6465
{
6566
$data = $this->get($confirm_status, $role_code, $email_address);
66-
if (is_null($data))
67+
68+
if (null === $data)
6769
{
6870
return null;
6971
}
7072

7173
$array = [];
74+
7275
foreach ($data as $object)
7376
{
7477
$array[] = new \PHPFUI\ConstantContact\Definition\AccountEmails($object);
@@ -77,7 +80,6 @@ public function getTyped(?string $confirm_status = null, ?string $role_code = nu
7780
return $array;
7881
}
7982

80-
8183
/**
8284
* POST Add an Account Email Address
8385
*
@@ -108,5 +110,4 @@ public function postTyped(\PHPFUI\ConstantContact\Definition\AccountEmailInput $
108110

109111
return $data ? new \PHPFUI\ConstantContact\Definition\AccountEmailCreateResponse($data) : null;
110112
}
111-
112113
}

Diff for: src/ConstantContact/V3/Account/Summary.php

-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public function getTyped(?string $extra_fields = null) : ?\PHPFUI\ConstantContac
4949
return $data ? new \PHPFUI\ConstantContact\Definition\Customer($data) : null;
5050
}
5151

52-
5352
/**
5453
* PUT (update) Account Details
5554
*
@@ -74,5 +73,4 @@ public function putTyped(\PHPFUI\ConstantContact\Definition\CustomerPut $body) :
7473

7574
return $data ? new \PHPFUI\ConstantContact\Definition\CustomerPut($data) : null;
7675
}
77-
7876
}

Diff for: src/ConstantContact/V3/Account/Summary/PhysicalAddress.php

-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public function getTyped() : ?\PHPFUI\ConstantContact\Definition\AccountPhysical
3333
return $data ? new \PHPFUI\ConstantContact\Definition\AccountPhysicalAddress($data) : null;
3434
}
3535

36-
3736
/**
3837
* POST the Physical Address for the Account
3938
*
@@ -60,7 +59,6 @@ public function postTyped(\PHPFUI\ConstantContact\Definition\AccountPhysicalAddr
6059
return $data ? new \PHPFUI\ConstantContact\Definition\AccountPhysicalAddress($data) : null;
6160
}
6261

63-
6462
/**
6563
* PUT (update) the Physical Address for an Account
6664
*
@@ -90,5 +88,4 @@ public function putTyped(\PHPFUI\ConstantContact\Definition\AccountPhysicalAddre
9088

9189
return $data ? new \PHPFUI\ConstantContact\Definition\AccountPhysicalAddress($data) : null;
9290
}
93-
9491
}

Diff for: src/ConstantContact/V3/Account/User/Privileges.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,26 @@ public function get() : ?array
2727

2828
return $this->doGet([]);
2929
}
30+
3031
/**
3132
* @return ?array<\PHPFUI\ConstantContact\Definition\UserPrivilegesResource>
3233
*/
3334
public function getTyped() : ?array
3435
{
3536
$data = $this->get();
36-
if (is_null($data))
37+
38+
if (null === $data)
3739
{
3840
return null;
3941
}
4042

4143
$array = [];
44+
4245
foreach ($data as $object)
4346
{
4447
$array[] = new \PHPFUI\ConstantContact\Definition\UserPrivilegesResource($object);
4548
}
4649

4750
return $array;
4851
}
49-
5052
}

Diff for: src/ConstantContact/V3/Activities.php

-1
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,4 @@ public function getTyped(?int $limit = null, ?string $state = null) : ?\PHPFUI\C
4545

4646
return $data ? new \PHPFUI\ConstantContact\Definition\Activities($data) : null;
4747
}
48-
4948
}

Diff for: src/ConstantContact/V3/Activities/AddListMemberships.php

-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,4 @@ public function postTyped(\PHPFUI\ConstantContact\Definition\ListActivityAddCont
3434

3535
return $data ? new \PHPFUI\ConstantContact\Definition\ActivityListsMembership($data) : null;
3636
}
37-
3837
}

Diff for: src/ConstantContact/V3/Activities/ContactDelete.php

-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,4 @@ public function postTyped(\PHPFUI\ConstantContact\Definition\ContactDelete $body
3636

3737
return $data ? new \PHPFUI\ConstantContact\Definition\ActivityDeleteStatus($data) : null;
3838
}
39-
4039
}

Diff for: src/ConstantContact/V3/Activities/ContactExports.php

-1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,4 @@ public function postTyped(\PHPFUI\ConstantContact\Definition\ContactsExport $bod
3535

3636
return $data ? new \PHPFUI\ConstantContact\Definition\ActivityExportStatus($data) : null;
3737
}
38-
3938
}

0 commit comments

Comments
 (0)