Skip to content

Commit

Permalink
Merge pull request #31 from kuzmany/fix-by-rectors
Browse files Browse the repository at this point in the history
Code improvements. Thanks @kuzmany
  • Loading branch information
ChrisRAoW authored Mar 22, 2021
2 parents 2fac5a5 + f3294de commit d553204
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion Parser/ItemTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public function getValue()
break;
case 'author':
$author = $feedItem->get_author();
$value = '';

if (!is_null($author)) {
$value = $author->get_link();
Expand Down
9 changes: 2 additions & 7 deletions Parser/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Parser
{
use ParamsTrait;

protected $content = null;
protected $content;

public function __construct($content, $event)
{
Expand Down Expand Up @@ -46,12 +46,7 @@ public function __construct($content, $event)
public function validateFeedUrl($url)
{
$url = trim($url);

if (empty($url) || !filter_var($url, FILTER_VALIDATE_URL)) {
return false;
}

return true;
return !empty($url) && filter_var($url, FILTER_VALIDATE_URL);
}

public function setContent($content)
Expand Down

0 comments on commit d553204

Please sign in to comment.