Skip to content

Commit

Permalink
Merge pull request #35 from adammeyer/master
Browse files Browse the repository at this point in the history
Article Keywords support
  • Loading branch information
m1x0n authored Jun 8, 2024
2 parents 66f6664 + d3e6c0d commit 533f743
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/HelpScoutDocs/Models/Article.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ class Article extends ArticleRef
*/
private ?array $related = null;

/**
* @var null|array|string[]
*/
private ?array $keywords = null;

public function __construct(?stdClass $data = null)
{
if ($data) {
Expand All @@ -31,6 +36,7 @@ public function __construct(?stdClass $data = null)
$this->code = $data->code ?? null;
$this->categories = $data->categories ?? null;
$this->related = $data->related ?? null;
$this->keywords = $data->keywords ?? null;
}
}

Expand Down Expand Up @@ -85,4 +91,20 @@ public function getText(): ?string
{
return $this->text;
}

/**
* @param array|string[] $keywords
*/
public function setKeywords(?array $keywords): void
{
$this->keywords = $keywords;
}

/**
* @return array|string[]|null
*/
public function getKeywords(): ?array
{
return $this->keywords;
}
}

0 comments on commit 533f743

Please sign in to comment.