Skip to content

Commit 0de4cc1

Browse files
committed
Fix CS
1 parent 948055d commit 0de4cc1

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

AbstractString.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function after($needle, bool $includeNeedle = false, int $offset = 0): se
9999
{
100100
$str = clone $this;
101101
$str->string = '';
102-
$i = \PHP_INT_MAX;
102+
$i = PHP_INT_MAX;
103103

104104
foreach ((array) $needle as $n) {
105105
$n = (string) $n;
@@ -111,7 +111,7 @@ public function after($needle, bool $includeNeedle = false, int $offset = 0): se
111111
}
112112
}
113113

114-
if (\PHP_INT_MAX === $i) {
114+
if (PHP_INT_MAX === $i) {
115115
return $str;
116116
}
117117

@@ -168,7 +168,7 @@ public function before($needle, bool $includeNeedle = false, int $offset = 0): s
168168
{
169169
$str = clone $this;
170170
$str->string = '';
171-
$i = \PHP_INT_MAX;
171+
$i = PHP_INT_MAX;
172172

173173
foreach ((array) $needle as $n) {
174174
$n = (string) $n;
@@ -180,7 +180,7 @@ public function before($needle, bool $includeNeedle = false, int $offset = 0): s
180180
}
181181
}
182182

183-
if (\PHP_INT_MAX === $i) {
183+
if (PHP_INT_MAX === $i) {
184184
return $str;
185185
}
186186

@@ -360,7 +360,7 @@ public function indexOf($needle, int $offset = 0): ?int
360360
throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
361361
}
362362

363-
$i = \PHP_INT_MAX;
363+
$i = PHP_INT_MAX;
364364

365365
foreach ($needle as $n) {
366366
$j = $this->indexOf((string) $n, $offset);
@@ -370,7 +370,7 @@ public function indexOf($needle, int $offset = 0): ?int
370370
}
371371
}
372372

373-
return \PHP_INT_MAX === $i ? null : $i;
373+
return PHP_INT_MAX === $i ? null : $i;
374374
}
375375

376376
/**

ByteString.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ public function reverse(): parent
356356
public function slice(int $start = 0, int $length = null): parent
357357
{
358358
$str = clone $this;
359-
$str->string = (string) substr($this->string, $start, $length ?? \PHP_INT_MAX);
359+
$str->string = (string) substr($this->string, $start, $length ?? PHP_INT_MAX);
360360

361361
return $str;
362362
}
@@ -372,14 +372,14 @@ public function snake(): parent
372372
public function splice(string $replacement, int $start = 0, int $length = null): parent
373373
{
374374
$str = clone $this;
375-
$str->string = substr_replace($this->string, $replacement, $start, $length ?? \PHP_INT_MAX);
375+
$str->string = substr_replace($this->string, $replacement, $start, $length ?? PHP_INT_MAX);
376376

377377
return $str;
378378
}
379379

380380
public function split(string $delimiter, int $limit = null, int $flags = null): array
381381
{
382-
if (1 > $limit = $limit ?? \PHP_INT_MAX) {
382+
if (1 > $limit = $limit ?? PHP_INT_MAX) {
383383
throw new InvalidArgumentException('Split limit must be a positive integer.');
384384
}
385385

CodePointString.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,14 @@ public function splice(string $replacement, int $start = 0, int $length = null):
211211
$str = clone $this;
212212
$start = $start ? \strlen(mb_substr($this->string, 0, $start, 'UTF-8')) : 0;
213213
$length = $length ? \strlen(mb_substr($this->string, $start, $length, 'UTF-8')) : $length;
214-
$str->string = substr_replace($this->string, $replacement, $start, $length ?? \PHP_INT_MAX);
214+
$str->string = substr_replace($this->string, $replacement, $start, $length ?? PHP_INT_MAX);
215215

216216
return $str;
217217
}
218218

219219
public function split(string $delimiter, int $limit = null, int $flags = null): array
220220
{
221-
if (1 > $limit = $limit ?? \PHP_INT_MAX) {
221+
if (1 > $limit = $limit ?? PHP_INT_MAX) {
222222
throw new InvalidArgumentException('Split limit must be a positive integer.');
223223
}
224224

Resources/bin/update-data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
throw new \ErrorException($msg, 0, $type, $file, $line);
1818
});
1919

20-
set_exception_handler(static function (\Throwable $exception): void {
20+
set_exception_handler(static function (Throwable $exception): void {
2121
echo "\n";
2222

2323
$cause = $exception;

Tests/FunctionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\String\AbstractString;
1616
use Symfony\Component\String\ByteString;
17-
use Symfony\Component\String\UnicodeString;
1817
use function Symfony\Component\String\s;
18+
use Symfony\Component\String\UnicodeString;
1919

2020
final class FunctionsTest extends TestCase
2121
{

UnicodeString.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public function replaceMatches(string $fromRegexp, $to): AbstractString
263263
public function slice(int $start = 0, int $length = null): AbstractString
264264
{
265265
$str = clone $this;
266-
$str->string = (string) grapheme_substr($this->string, $start, $length ?? \PHP_INT_MAX);
266+
$str->string = (string) grapheme_substr($this->string, $start, $length ?? PHP_INT_MAX);
267267

268268
return $str;
269269
}
@@ -272,8 +272,8 @@ public function splice(string $replacement, int $start = 0, int $length = null):
272272
{
273273
$str = clone $this;
274274
$start = $start ? \strlen(grapheme_substr($this->string, 0, $start)) : 0;
275-
$length = $length ? \strlen(grapheme_substr($this->string, $start, $length ?? \PHP_INT_MAX)) : $length;
276-
$str->string = substr_replace($this->string, $replacement, $start, $length ?? \PHP_INT_MAX);
275+
$length = $length ? \strlen(grapheme_substr($this->string, $start, $length ?? PHP_INT_MAX)) : $length;
276+
$str->string = substr_replace($this->string, $replacement, $start, $length ?? PHP_INT_MAX);
277277
normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string);
278278

279279
if (false === $str->string) {
@@ -285,7 +285,7 @@ public function splice(string $replacement, int $start = 0, int $length = null):
285285

286286
public function split(string $delimiter, int $limit = null, int $flags = null): array
287287
{
288-
if (1 > $limit = $limit ?? \PHP_INT_MAX) {
288+
if (1 > $limit = $limit ?? PHP_INT_MAX) {
289289
throw new InvalidArgumentException('Split limit must be a positive integer.');
290290
}
291291

0 commit comments

Comments
 (0)