Skip to content

Commit

Permalink
Merge branch 'release/1.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Condo committed Apr 14, 2023
2 parents b1c5140 + 6aec05f commit 79890ec
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,4 @@ public function updateCollateContentFields($content) {

## Version

1.1.1
1.1.2
10 changes: 7 additions & 3 deletions src/Analysis/FocusKeywordContentAnalysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public function findOccurrences()
public function getContentFromDom()
{
$dom = $this->getPage()->getRenderedHtmlDomParser();

if (!$dom) {
return '';
}


$result = $dom->find('body', 0);

return strtolower(strip_tags($result ? $result->innertext() : ''));
Expand All @@ -55,7 +55,11 @@ public function getContentFromDom()
*/
public function getKeyword()
{
return strtolower($this->getPage()->FocusKeyword);
if ($keyword = $this->getPage()->FocusKeyword) {
return strtolower($keyword);
}

return '';
}

/**
Expand Down
6 changes: 5 additions & 1 deletion src/Analysis/FocusKeywordUniqueAnalysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ class FocusKeywordUniqueAnalysis extends Analysis
*/
public function getKeyword()
{
return strtolower($this->getPage()->FocusKeyword);
if ($keyword = $this->getPage()->FocusKeyword) {
return strtolower($keyword);
}

return '';
}

/**
Expand Down
6 changes: 5 additions & 1 deletion src/Analysis/FocusKeywordUrlAnalysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ class FocusKeywordUrlAnalysis extends Analysis
*/
public function getKeyword()
{
return strtolower($this->getPage()->FocusKeyword);
if ($keyword = $this->getPage()->FocusKeyword) {
return strtolower($keyword);
}

return '';
}

/**
Expand Down

0 comments on commit 79890ec

Please sign in to comment.