Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/StringHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

// Check if we are incrementing an existing pattern, or appending a new one.
if (preg_match($rxSearch, $string, $matches)) {
$n = empty($n) ? ($matches[1] + 1) : $n;

Check failure on line 77 in src/StringHelper.php

View workflow job for this annotation

GitHub Actions / framework-ci / Run PHPstan

Binary operation "+" between string and 1 results in an error.
$string = preg_replace($rxReplace, sprintf($oldFormat, $n), $string);
} else {
$n = empty($n) ? 2 : $n;
Expand Down Expand Up @@ -261,7 +261,7 @@
* @param string|string[] $search String to search
* @param string|string[] $replace Existing string to replace
* @param string $str New string to replace with
* @param integer|null|boolean $count Optional count value to be passed by referene
* @param integer|null|boolean $count Optional count value to be passed by reference
*
* @return string UTF-8 String
*
Expand Down Expand Up @@ -375,7 +375,7 @@
}

// Get current locale
$locale0 = setlocale(LC_COLLATE, 0);

Check failure on line 378 in src/StringHelper.php

View workflow job for this annotation

GitHub Actions / framework-ci / Run PHPstan

Parameter #2 $locale of function setlocale expects array|string|null, int given.

if (!$locale = setlocale(LC_COLLATE, $locale)) {
$locale = $locale0;
Expand Down
Loading