Skip to content

Commit

Permalink
fix: return type for view function
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Nov 12, 2023
1 parent 9cda909 commit 3cc454b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions common/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,14 @@ function view(string $partialPath, array $data = []): null|string
* @param string $partialPath
* @param array $data
*
* @return null|string
* @noinspection PhpMissingReturnTypeInspection
*/
function tgn_view(string $partialPath, array $data = []): null|string
function tgn_view(string $partialPath, array $data = [])
{
if (class_exists('Illuminate\Foundation\Application')) {
$partialPath = config('telegram-git-notifier.view.namespace') . '::' . $partialPath;
}

$content = view($partialPath, $data);

return $content ?: null;
return view($partialPath, $data);
}
}

0 comments on commit 3cc454b

Please sign in to comment.