Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
IsraelOrtuno committed Jan 21, 2019
1 parent 26885f3 commit 9dc5660
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/PermalinkFormComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,9 @@ public function compose(View $view)
*/
protected function getPermalinkPath($permalink = null)
{
if ($permalink) {
return substr(
$permalink->final_path, 0, strrpos($permalink->final_path, "/")
);
}

return '';
return $permalink ? substr(
$permalink->final_path, 0, strrpos($permalink->final_path, "/")
) : '';
}

/**
Expand Down

0 comments on commit 9dc5660

Please sign in to comment.