From a088e1936d7ad534bb1e8bf2fedbb824e506f838 Mon Sep 17 00:00:00 2001 From: fab2s Date: Tue, 27 Sep 2022 20:22:55 +0200 Subject: [PATCH] update badges --- .travis.yml | 14 -------------- README.md | 2 +- src/Utf8.php | 8 ++++---- 3 files changed, 5 insertions(+), 19 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 208a69a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: php - -php: - - 7.2 - - 7.3 - - 7.4 - - 8.0 - -before_script: - - composer self-update - - composer install --no-interaction - -script: - - vendor/bin/phpunit diff --git a/README.md b/README.md index a641342..91d9eaa 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Utf8 -[![Build Status](https://travis-ci.com/fab2s/Utf8.svg?branch=master)](https://travis-ci.com/fab2s/Utf8) [![Total Downloads](https://poser.pugx.org/fab2s/utf8/downloads)](//packagist.org/packages/fab2s/utf8) [![Monthly Downloads](https://poser.pugx.org/fab2s/utf8/d/monthly)](//packagist.org/packages/fab2s/utf8) [![Latest Stable Version](https://poser.pugx.org/fab2s/utf8/v/stable)](https://packagist.org/packages/fab2s/utf8) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/fab2s/Utf8/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/fab2s/Utf8/?branch=master) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com) [![License](https://poser.pugx.org/fab2s/utf8/license)](https://packagist.org/packages/fab2s/utf8) +[![CI](https://github.com/fab2s/Utf8/actions/workflows/ci.yml/badge.svg)](https://github.com/fab2s/Utf8/actions/workflows/ci.yml) [![CI](https://github.com/fab2s/Utf8/actions/workflows/ci.yml/badge.svg)](https://github.com/fab2s/Utf8/actions/workflows/ci.yml) [![Total Downloads](https://poser.pugx.org/fab2s/utf8/downloads)](//packagist.org/packages/fab2s/utf8) [![Monthly Downloads](https://poser.pugx.org/fab2s/utf8/d/monthly)](//packagist.org/packages/fab2s/utf8) [![Latest Stable Version](https://poser.pugx.org/fab2s/utf8/v/stable)](https://packagist.org/packages/fab2s/utf8) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/fab2s/Utf8/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/fab2s/Utf8/?branch=master) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com) [![License](https://poser.pugx.org/fab2s/utf8/license)](https://packagist.org/packages/fab2s/utf8) A purely static UTF-8 Helper based on [mb_string](https://php.net/mb_string) and [ext-intl](https://php.net/intl) diff --git a/src/Utf8.php b/src/Utf8.php index c4bcf4d..f322ce1 100644 --- a/src/Utf8.php +++ b/src/Utf8.php @@ -42,9 +42,9 @@ class Utf8 /** * strrpos * - * @param string $haystack - * @param string $needle - * @param int $offset + * @param string $haystack + * @param string $needle + * @param int|null $offset * * @return int|false */ @@ -55,7 +55,7 @@ public static function strrpos(string $haystack, string $needle, ?int $offset = return false; } - return mb_strrpos($haystack, $needle, $offset, static::ENC_UTF8); + return mb_strrpos($haystack, $needle, (int) $offset, static::ENC_UTF8); } /**