Skip to content

Commit

Permalink
refactor: Set return type to Markup for imgTag() and pictureTag()
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Mar 31, 2024
1 parent 6e7bf1b commit 010df50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/models/OptimizedImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ public function linkPreloadTag($linkAttrs = [])
*
* @return Markup
*/
public function imgTag($loading = 'eager', $placeHolder = 'box', $imgAttrs = [])
public function imgTag($loading = 'eager', $placeHolder = 'box', $imgAttrs = []): Markup
{
// Merge the passed in options with the tag attributes
$attrs = array_merge([
Expand Down Expand Up @@ -460,7 +460,7 @@ public function imgTag($loading = 'eager', $placeHolder = 'box', $imgAttrs = [])
*
* @return Markup
*/
public function pictureTag($loading = 'eager', $placeHolder = 'box', $pictureAttrs = [], $srcsetAttrs = [], $imgAttrs = [])
public function pictureTag($loading = 'eager', $placeHolder = 'box', $pictureAttrs = [], $srcsetAttrs = [], $imgAttrs = []): Markup
{
$content = '';
// Handle the webp srcset
Expand Down

0 comments on commit 010df50

Please sign in to comment.