diff options
author | 2022-07-01 15:10:30 +0200 | |
---|---|---|
committer | 2022-07-01 15:10:30 +0200 | |
commit | 4f75591060d95208a301bc6bf460d875631b29cc (patch) | |
tree | 4e37d86840e8d990a563ba75d3de6f84a53cc2de /lib/php8backports.php | |
parent | 66568e3a39c61546c09a47a5688914a0bdf3c60c (diff) | |
download | rss-bridge-4f75591060d95208a301bc6bf460d875631b29cc.tar.gz rss-bridge-4f75591060d95208a301bc6bf460d875631b29cc.tar.zst rss-bridge-4f75591060d95208a301bc6bf460d875631b29cc.zip |
Reformat codebase v4 (#2872)
Reformat code base to PSR12
Co-authored-by: rssbridge <noreply@github.com>
Diffstat (limited to 'lib/php8backports.php')
-rw-r--r-- | lib/php8backports.php | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/lib/php8backports.php b/lib/php8backports.php index 3b2bb966..30dfdbd9 100644 --- a/lib/php8backports.php +++ b/lib/php8backports.php @@ -1,4 +1,5 @@ <?php + /** * This file is part of RSS-Bridge, a PHP project capable of generating RSS and * Atom feeds for websites that don't have one. @@ -6,9 +7,9 @@ * For the full license information, please view the UNLICENSE file distributed * with this source code. * - * @package Core - * @license http://unlicense.org/ UNLICENSE - * @link https://github.com/rss-bridge/rss-bridge + * @package Core + * @license http://unlicense.org/ UNLICENSE + * @link https://github.com/rss-bridge/rss-bridge */ // based on https://github.com/laravel/framework/blob/8.x/src/Illuminate/Support/Str.php @@ -34,19 +35,22 @@ // THE SOFTWARE. if (!function_exists('str_starts_with')) { - function str_starts_with($haystack, $needle) { - return (string)$needle !== '' && strncmp($haystack, $needle, strlen($needle)) === 0; - } + function str_starts_with($haystack, $needle) + { + return (string)$needle !== '' && strncmp($haystack, $needle, strlen($needle)) === 0; + } } if (!function_exists('str_ends_with')) { - function str_ends_with($haystack, $needle) { - return $needle !== '' && substr($haystack, -strlen($needle)) === (string)$needle; - } + function str_ends_with($haystack, $needle) + { + return $needle !== '' && substr($haystack, -strlen($needle)) === (string)$needle; + } } if (!function_exists('str_contains')) { - function str_contains($haystack, $needle) { - return $needle !== '' && mb_strpos($haystack, $needle) !== false; - } + function str_contains($haystack, $needle) + { + return $needle !== '' && mb_strpos($haystack, $needle) !== false; + } } |