Skip to content

Commit

Permalink
ENH Improve typing to support refactored template layer
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Sep 26, 2024
1 parent d4296a9 commit cf02afc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -1322,16 +1322,14 @@ public function forTemplate(): string

/**
* Return a html5 tag of the appropriate for this file (normally img or a)
*
* @return string
*/
public function getTag()
public function getTag(): string
{
$template = $this->File->getFrontendTemplate();
if (empty($template)) {
return '';
}
return (string)$this->renderWith($template);
return $this->renderWith($template);
}

/**
Expand Down

0 comments on commit cf02afc

Please sign in to comment.