Skip to content

Commit 1ce51e8

Browse files
authored
Fixed PHPStan (#7370)
* Fixed PHPStan * Update RunTestsInCoroutine.php
1 parent 89ab60e commit 1ce51e8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Str.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,12 @@ public static function apa($value)
112112
$hyphenatedWords = explode('-', $lowercaseWord);
113113

114114
$hyphenatedWords = array_map(function ($part) use ($minorWords) {
115-
return (in_array($part, $minorWords) && mb_strlen($part) <= 3) ? $part : ucfirst($part);
115+
return (in_array($part, $minorWords)) ? $part : ucfirst($part);
116116
}, $hyphenatedWords);
117117

118118
$words[$i] = implode('-', $hyphenatedWords);
119119
} else {
120120
if (in_array($lowercaseWord, $minorWords)
121-
&& mb_strlen($lowercaseWord) <= 3
122121
&& ! ($i === 0 || in_array(mb_substr($words[$i - 1], -1), $endPunctuation))) {
123122
$words[$i] = $lowercaseWord;
124123
} else {

0 commit comments

Comments
 (0)