Skip to content

Commit 0b83395

Browse files
committed
V21.9.5 - 2021-09-22
1 parent 0c308f0 commit 0b83395

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

Tools/Generator.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,13 @@ public function generateDefinition(string $class, array $properties) : void
176176
// description: "The contact phone number to associate with the client account."
177177
if (isset($details['description']))
178178
{
179-
$details['description'] = str_replace('(/api_guide/', '(https://v3.developer.constantcontact.com/api_guide/', $details['description']);
179+
$description = $this->cleanDescription($details['description']);
180180
if (is_array($type))
181181
{
182182
$type = $originalType;
183183
}
184184
$type = str_replace('\\\\', '\\', $type);
185-
$docBlock[] = "{$type} {$dollar}{$name} {$details['description']}";
185+
$docBlock[] = "{$type} {$dollar}{$name} {$description}";
186186
}
187187
}
188188
$this->generateFromTemplate($class, ['fields' => $fields, 'minLength' => $minLength, 'maxLength' => $maxLength, ], $docBlock);
@@ -380,12 +380,17 @@ private function getClassName(string $path) : string
380380
return \trim($className, '\\');
381381
}
382382

383-
private function formatDescription(string $description) : string
383+
private function cleanDescription(string $description) : string
384384
{
385385
// fix issues in documentation
386-
$description = str_replace(['(/api_guide/', '<a/>', 'href="/api_guide/'],
387-
['(https://v3.developer.constantcontact.com/api_guide/', '</a>', 'href="https://v3.developer.constantcontact.com/api_guide/'],
388-
$description);
386+
return str_replace(['(/api_guide/', '<a/>', 'href="/api_guide/'],
387+
['(https://v3.developer.constantcontact.com/api_guide/', '</a>', 'href="https://v3.developer.constantcontact.com/api_guide/'],
388+
$description);
389+
}
390+
391+
private function formatDescription(string $description) : string
392+
{
393+
$description = $this->cleanDescription($description);
389394
$lines = \explode("\n", $description);
390395
$blocks = [];
391396

src/ConstantContact/Definition/CrossReference.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ class CrossReference extends \PHPFUI\ConstantContact\Definition\Base
66
{
77
/**
88
* @var string $v2_email_campaign_id Identifies an email campaign in the V2 API.
9-
* @var PHPFUI\ConstantContact\UUID $campaign_id <p>Identifies a campaign in the V3 API. In the V3 API, each campaign contains one or more activities. For more information, see <a href="/api_guide/v3_v2_email_campaign_deltas.html" target_"blank">V3 Email Campaign Resource Changes<a/>.<p>
10-
* @var PHPFUI\ConstantContact\UUID $campaign_activity_id <p>Identifies a campaign activity in the V3 API. In the V3 API, each campaign contains one or more activities. Email type activities represent the detailed information in an email and contain properties like <code>from_email</code> and <code>from_name</code>. For more information, see <a href="/api_guide/v3_v2_email_campaign_deltas.html" target_"blank">V3 Campaign Resource Changes<a/>.<p>
9+
* @var PHPFUI\ConstantContact\UUID $campaign_id <p>Identifies a campaign in the V3 API. In the V3 API, each campaign contains one or more activities. For more information, see <a href="https://v3.developer.constantcontact.com/api_guide/v3_v2_email_campaign_deltas.html" target_"blank">V3 Email Campaign Resource Changes</a>.<p>
10+
* @var PHPFUI\ConstantContact\UUID $campaign_activity_id <p>Identifies a campaign activity in the V3 API. In the V3 API, each campaign contains one or more activities. Email type activities represent the detailed information in an email and contain properties like <code>from_email</code> and <code>from_name</code>. For more information, see <a href="https://v3.developer.constantcontact.com/api_guide/v3_v2_email_campaign_deltas.html" target_"blank">V3 Campaign Resource Changes</a>.<p>
1111
*/
1212

1313
protected static array $fields = [

src/ConstantContact/V3/Account/Emails.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function __construct(\PHPFUI\ConstantContact\Client $client)
1818
*
1919
* Use this method to return a collection of email addresses for the account
2020
* associated with your access token. When you <a href="https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Campaigns/createEmailCampaignUsingPOST"
21-
* target="_blank">Create an Email Campaign<a/>, you must use an account
21+
* target="_blank">Create an Email Campaign</a>, you must use an account
2222
* email address with a `CONFIRMED` status in the email campaign `from_email`
2323
* and `reply_to_email` headers.
2424
*

0 commit comments

Comments
 (0)