@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use Helldar\Support\Facades\Digit; |
| 4 | 4 | |
| 5 | -if (! function_exists('factorial')) { |
|
| 5 | +if (!function_exists('factorial')) { |
|
| 6 | 6 | /** |
| 7 | 7 | * Calculating the factorial of a number. |
| 8 | 8 | * |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | } |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | -if (! function_exists('short_number')) { |
|
| 19 | +if (!function_exists('short_number')) { |
|
| 20 | 20 | /** |
| 21 | 21 | * Converts a number into a short version. |
| 22 | 22 | * eg: 1000 >> 1K. |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use Helldar\Support\Facades\Str; |
| 4 | 4 | |
| 5 | -if (! function_exists('de')) { |
|
| 5 | +if (!function_exists('de')) { |
|
| 6 | 6 | /** |
| 7 | 7 | * Convert special HTML entities back to characters. |
| 8 | 8 | * |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | } |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | -if (! function_exists('str_choice')) { |
|
| 19 | +if (!function_exists('str_choice')) { |
|
| 20 | 20 | /** |
| 21 | 21 | * The str_choice function translates the given language line with inflection. |
| 22 | 22 | * |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | -if (! function_exists('str_replace_spaces')) { |
|
| 35 | +if (!function_exists('str_replace_spaces')) { |
|
| 36 | 36 | /** |
| 37 | 37 | * Replacing multiple spaces with a single space. |
| 38 | 38 | * |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | -if (! function_exists('str_finish')) { |
|
| 49 | +if (!function_exists('str_finish')) { |
|
| 50 | 50 | /** |
| 51 | 51 | * Cap a string with a single instance of a given value. |
| 52 | 52 | * |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | -if (! function_exists('str_ends_with')) { |
|
| 64 | +if (!function_exists('str_ends_with')) { |
|
| 65 | 65 | /** |
| 66 | 66 | * Determine if a given string ends with a given substring. |
| 67 | 67 | * |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use Helldar\Support\Facades\Http; |
| 4 | 4 | |
| 5 | -if (! function_exists('url_exists')) { |
|
| 5 | +if (!function_exists('url_exists')) { |
|
| 6 | 6 | /** |
| 7 | 7 | * Checks whether a file or directory exists on URL. |
| 8 | 8 | * |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | } |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | -if (! function_exists('base_url')) { |
|
| 19 | +if (!function_exists('base_url')) { |
|
| 20 | 20 | /** |
| 21 | 21 | * Get the domain name from the URL. |
| 22 | 22 | * |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | -if (! function_exists('subdomain_name')) { |
|
| 33 | +if (!function_exists('subdomain_name')) { |
|
| 34 | 34 | /** |
| 35 | 35 | * Retrieving the current subdomain name. |
| 36 | 36 | * |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Helldar\Support\Facades\Dumper; |
| 4 | 4 | |
| 5 | -if (! function_exists('dd_sql')) { |
|
| 5 | +if (!function_exists('dd_sql')) { |
|
| 6 | 6 | /** |
| 7 | 7 | * Dump the passed variables and end the script. |
| 8 | 8 | * |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | { |
| 10 | 10 | public static function isUnix(): bool |
| 11 | 11 | { |
| 12 | - return ! static::isWindows(); |
|
| 12 | + return !static::isWindows(); |
|
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | public static function isWindows(): bool |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | $sql = $query->toSql(); |
| 27 | 27 | |
| 28 | - $bindings = array_map(function ($binding) { |
|
| 28 | + $bindings = array_map(function($binding) { |
|
| 29 | 29 | return is_int($binding) || is_float($binding) ? $binding : "'{$binding}'"; |
| 30 | 30 | }, $query->getBindings()); |
| 31 | 31 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | public static function renameKeysMap(array $array, array $map): array |
| 41 | 41 | { |
| 42 | - return self::renameKeys($array, static function ($key) use ($map) { |
|
| 42 | + return self::renameKeys($array, static function($key) use ($map) { |
|
| 43 | 43 | return $map[$key] ?? $key; |
| 44 | 44 | }); |
| 45 | 45 | } |
@@ -225,8 +225,8 @@ discard block |
||
| 225 | 225 | return $array; |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | - return array_filter($array, function ($key) use ($keys) { |
|
| 229 | - return ! in_array($key, $keys); |
|
| 228 | + return array_filter($array, function($key) use ($keys) { |
|
| 229 | + return !in_array($key, $keys); |
|
| 230 | 230 | }, ARRAY_FILTER_USE_KEY); |
| 231 | 231 | } |
| 232 | 232 | |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | public static function of($haystack, $needles): bool |
| 11 | 11 | { |
| 12 | - if (! self::exists($haystack)) { |
|
| 12 | + if (!self::exists($haystack)) { |
|
| 13 | 13 | return false; |
| 14 | 14 | } |
| 15 | 15 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | $classname = self::classname($haystack); |
| 18 | 18 | |
| 19 | 19 | foreach (Arr::wrap($needles) as $needle) { |
| 20 | - if (! self::exists($needle)) { |
|
| 20 | + if (!self::exists($needle)) { |
|
| 21 | 21 | continue; |
| 22 | 22 | } |
| 23 | 23 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | public static function all(string $path): DirectoryIterator |
| 18 | 18 | { |
| 19 | - if (! file_exists($path)) { |
|
| 19 | + if (!file_exists($path)) { |
|
| 20 | 20 | throw new DirectoryNotFoundException($path); |
| 21 | 21 | } |
| 22 | 22 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $items = []; |
| 36 | 36 | |
| 37 | 37 | foreach (static::all($path) as $dir) { |
| 38 | - if ($dir->isDir() && ! $dir->isDot()) { |
|
| 38 | + if ($dir->isDir() && !$dir->isDot()) { |
|
| 39 | 39 | $items[] = $dir->getFilename(); |
| 40 | 40 | } |
| 41 | 41 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | public static function make(string $path, int $mode = 755): bool |
| 49 | 49 | { |
| 50 | - if (! file_exists($path)) { |
|
| 50 | + if (!file_exists($path)) { |
|
| 51 | 51 | return mkdir($path, $mode, true); |
| 52 | 52 | } |
| 53 | 53 | |