shetabit /
helper
| 1 | <?php |
||||
| 2 | |||||
| 3 | if (!function_exists('random_password')) { |
||||
| 4 | /** |
||||
| 5 | * Generate random password. |
||||
| 6 | * |
||||
| 7 | * @param int $length |
||||
| 8 | * @param string $availableSets |
||||
| 9 | * |
||||
| 10 | * @return string |
||||
| 11 | */ |
||||
| 12 | function random_password(int $length = 9, string $availableSets = 'luds') |
||||
| 13 | { |
||||
| 14 | return app('helper')->randomPassword($length, $availableSets); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 15 | } |
||||
| 16 | } |
||||
| 17 | |||||
| 18 | if (!function_exists('persian_slug')) { |
||||
| 19 | /** |
||||
| 20 | * Generate persian slug. |
||||
| 21 | * |
||||
| 22 | * @param string $string |
||||
| 23 | * @param string $separator |
||||
| 24 | * |
||||
| 25 | * @return false|mixed|string|string[]|null |
||||
| 26 | */ |
||||
| 27 | function persian_slug(string $string, string $separator = '-') |
||||
| 28 | { |
||||
| 29 | return app('helper')->persianSlug($string, $separator); |
||||
|
0 ignored issues
–
show
The function
app was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 30 | } |
||||
| 31 | } |
||||
| 32 | |||||
| 33 | if (!function_exists('fa_to_en_nums')) { |
||||
| 34 | /** |
||||
| 35 | * Convert all Persian(Farsi) numbers to English. |
||||
| 36 | * |
||||
| 37 | * @param string $number |
||||
| 38 | * |
||||
| 39 | * @return mixed |
||||
| 40 | */ |
||||
| 41 | function fa_to_en_nums(string $number) |
||||
| 42 | { |
||||
| 43 | return app('helper')->faToEnNums($number); |
||||
|
0 ignored issues
–
show
The function
app was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 44 | } |
||||
| 45 | } |
||||
| 46 | |||||
| 47 | if (!function_exists('remove_comma')) { |
||||
| 48 | /** |
||||
| 49 | * Remove comma's from value. |
||||
| 50 | * |
||||
| 51 | * @param string $value |
||||
| 52 | * |
||||
| 53 | * @return string |
||||
| 54 | */ |
||||
| 55 | function remove_comma(string $value) : string |
||||
| 56 | { |
||||
| 57 | return app('helper')->removeComma($value); |
||||
|
0 ignored issues
–
show
The function
app was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 58 | } |
||||
| 59 | } |
||||
| 60 | |||||
| 61 | if (!function_exists('to_gregorian')) { |
||||
| 62 | /** |
||||
| 63 | * Convert jalali date to gregorian date. |
||||
| 64 | * |
||||
| 65 | * @param string $jDate |
||||
| 66 | * |
||||
| 67 | * @return null|string |
||||
| 68 | */ |
||||
| 69 | function to_gregorian(string $jDate) |
||||
| 70 | { |
||||
| 71 | return app('helper')->toGregorian($jDate); |
||||
|
0 ignored issues
–
show
The function
app was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 72 | } |
||||
| 73 | } |
||||
| 74 | |||||
| 75 | if (!function_exists('mb_json_encode')) { |
||||
| 76 | /** |
||||
| 77 | * json_encode() for multibyte characters. |
||||
| 78 | * |
||||
| 79 | * @param array $input |
||||
| 80 | * |
||||
| 81 | * @return null|string |
||||
| 82 | */ |
||||
| 83 | function mb_json_encode(array $input) |
||||
| 84 | { |
||||
| 85 | return app('helper')->mbJsonEncode($input); |
||||
|
0 ignored issues
–
show
The function
app was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 86 | } |
||||
| 87 | } |
||||
| 88 |