From 3dd4a4f43e932b1d622e8dabd1ea99a526efe9b4 Mon Sep 17 00:00:00 2001 From: Nafies Luthfi Date: Tue, 13 Nov 2018 20:38:38 +0800 Subject: [PATCH] Add docblocs on helper functions --- app/helpers.php | 91 +++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 79 insertions(+), 12 deletions(-) diff --git a/app/helpers.php b/app/helpers.php index 6862aa7..f97a933 100755 --- a/app/helpers.php +++ b/app/helpers.php @@ -1,10 +1,9 @@ format($differenceFormat); } +/** + * Get logo image on html img tag format. + * + * @param array $attributes + * @return \Illuminate\Support\HtmlString + */ function appLogoImage($attributes = []) { return Html::image( @@ -186,6 +242,11 @@ function appLogoImage($attributes = []) ); } +/** + * Get logo image path. + * + * @return string + */ function appLogoPath() { $defaultLogoImagePath = 'default-logo.png'; @@ -198,6 +259,13 @@ function appLogoPath() return asset('assets/imgs/'.$defaultLogoImagePath); } +/** + * Get array of dates in a month. + * + * @param string $year + * @param string $month + * @return array + */ function monthDateArray($year, $month) { $dateCount = Carbon::parse($year.'-'.$month)->format('t'); @@ -212,9 +280,8 @@ function monthDateArray($year, $month) /** * Function helper to add flash notification. * - * @param null|string $message The flashed message. - * @param string $level Level/type of message - * + * @param null|string $message The flashed message. + * @param string $level Level/type of message * @return void */ function flash($message = null, $level = 'info')