Skip to content

Commit

Permalink
Merge cc2db9c into 213b000
Browse files Browse the repository at this point in the history
  • Loading branch information
scrutinizer-auto-fixer committed Jan 17, 2015
2 parents 213b000 + cc2db9c commit 8e017da
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Traits/CopyIntroduction.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getIntroduction($ellipse = "...")
if ($intro === null && ($copy = $this->getCopy()) !== null) {
$copy = trim(strip_tags($this->getCopy()));

if (!empty($copy)) {
if ( ! empty($copy)) {
$intro = $this->truncateWords($copy, $ellipse);
}
}
Expand All @@ -54,6 +54,10 @@ public function getIntroduction($ellipse = "...")
}


/**
* @param string $copy
* @param string $ellipse
*/
protected function truncateWords($copy, $ellipse)
{
$words = explode(" ", trim($copy), $this->introWordCount + 1);
Expand Down

0 comments on commit 8e017da

Please sign in to comment.