Skip to content

Commit bacdfe4

Browse files
committed
Fix CS
1 parent 978261d commit bacdfe4

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

AbstractString.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
*/
3232
abstract class AbstractString implements \JsonSerializable
3333
{
34-
public const PREG_PATTERN_ORDER = \PREG_PATTERN_ORDER;
35-
public const PREG_SET_ORDER = \PREG_SET_ORDER;
36-
public const PREG_OFFSET_CAPTURE = \PREG_OFFSET_CAPTURE;
37-
public const PREG_UNMATCHED_AS_NULL = \PREG_UNMATCHED_AS_NULL;
34+
public const PREG_PATTERN_ORDER = PREG_PATTERN_ORDER;
35+
public const PREG_SET_ORDER = PREG_SET_ORDER;
36+
public const PREG_OFFSET_CAPTURE = PREG_OFFSET_CAPTURE;
37+
public const PREG_UNMATCHED_AS_NULL = PREG_UNMATCHED_AS_NULL;
3838

3939
public const PREG_SPLIT = 0;
40-
public const PREG_SPLIT_NO_EMPTY = \PREG_SPLIT_NO_EMPTY;
41-
public const PREG_SPLIT_DELIM_CAPTURE = \PREG_SPLIT_DELIM_CAPTURE;
42-
public const PREG_SPLIT_OFFSET_CAPTURE = \PREG_SPLIT_OFFSET_CAPTURE;
40+
public const PREG_SPLIT_NO_EMPTY = PREG_SPLIT_NO_EMPTY;
41+
public const PREG_SPLIT_DELIM_CAPTURE = PREG_SPLIT_DELIM_CAPTURE;
42+
public const PREG_SPLIT_OFFSET_CAPTURE = PREG_SPLIT_OFFSET_CAPTURE;
4343

4444
protected $string = '';
4545
protected $ignoreCase = false;
@@ -262,7 +262,7 @@ public function collapseWhitespace(): self
262262
public function endsWith($suffix): bool
263263
{
264264
if (!\is_array($suffix) && !$suffix instanceof \Traversable) {
265-
throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, \get_class($this)));
265+
throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
266266
}
267267

268268
foreach ($suffix as $s) {
@@ -317,7 +317,7 @@ public function ensureStart(string $prefix): self
317317
public function equalsTo($string): bool
318318
{
319319
if (!\is_array($string) && !$string instanceof \Traversable) {
320-
throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, \get_class($this)));
320+
throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
321321
}
322322

323323
foreach ($string as $s) {
@@ -351,7 +351,7 @@ public function ignoreCase(): self
351351
public function indexOf($needle, int $offset = 0): ?int
352352
{
353353
if (!\is_array($needle) && !$needle instanceof \Traversable) {
354-
throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, \get_class($this)));
354+
throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
355355
}
356356

357357
$i = \PHP_INT_MAX;
@@ -373,7 +373,7 @@ public function indexOf($needle, int $offset = 0): ?int
373373
public function indexOfLast($needle, int $offset = 0): ?int
374374
{
375375
if (!\is_array($needle) && !$needle instanceof \Traversable) {
376-
throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, \get_class($this)));
376+
throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
377377
}
378378

379379
$i = null;
@@ -536,7 +536,7 @@ public function split(string $delimiter, int $limit = null, int $flags = null):
536536
public function startsWith($prefix): bool
537537
{
538538
if (!\is_array($prefix) && !$prefix instanceof \Traversable) {
539-
throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, \get_class($this)));
539+
throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));
540540
}
541541

542542
foreach ($prefix as $prefix) {

AbstractUnicodeString.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function ascii(array $rules = []): self
139139
}
140140
} elseif (!\function_exists('iconv')) {
141141
$s = preg_replace('/[^\x00-\x7F]/u', '?', $s);
142-
} elseif (\ICONV_IMPL === 'glibc') {
142+
} elseif (ICONV_IMPL === 'glibc') {
143143
$s = iconv('UTF-8', 'ASCII//TRANSLIT', $s);
144144
} else {
145145
$s = preg_replace_callback('/[^\x00-\x7F]/u', static function ($c) {
@@ -223,7 +223,7 @@ public function lower(): parent
223223

224224
public function match(string $regexp, int $flags = 0, int $offset = 0): array
225225
{
226-
$match = ((\PREG_PATTERN_ORDER | \PREG_SET_ORDER) & $flags) ? 'preg_match_all' : 'preg_match';
226+
$match = ((PREG_PATTERN_ORDER | PREG_SET_ORDER) & $flags) ? 'preg_match_all' : 'preg_match';
227227

228228
if ($this->ignoreCase) {
229229
$regexp .= 'i';
@@ -309,7 +309,7 @@ public function replaceMatches(string $fromRegexp, $to): parent
309309

310310
if (\is_array($to) || $to instanceof \Closure) {
311311
if (!\is_callable($to)) {
312-
throw new \TypeError(sprintf('Argument 2 passed to %s::replaceMatches() must be callable, array given.', \get_class($this)));
312+
throw new \TypeError(sprintf('Argument 2 passed to %s::replaceMatches() must be callable, array given.', static::class));
313313
}
314314

315315
$replace = 'preg_replace_callback';

ByteString.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function lower(): parent
193193

194194
public function match(string $regexp, int $flags = 0, int $offset = 0): array
195195
{
196-
$match = ((\PREG_PATTERN_ORDER | \PREG_SET_ORDER) & $flags) ? 'preg_match_all' : 'preg_match';
196+
$match = ((PREG_PATTERN_ORDER | PREG_SET_ORDER) & $flags) ? 'preg_match_all' : 'preg_match';
197197

198198
if ($this->ignoreCase) {
199199
$regexp .= 'i';
@@ -271,7 +271,7 @@ public function replaceMatches(string $fromRegexp, $to): parent
271271

272272
if (\is_array($to)) {
273273
if (!\is_callable($to)) {
274-
throw new \TypeError(sprintf('Argument 2 passed to %s::replaceMatches() must be callable, array given.', \get_class($this)));
274+
throw new \TypeError(sprintf('Argument 2 passed to %s::replaceMatches() must be callable, array given.', static::class));
275275
}
276276

277277
$replace = 'preg_replace_callback';

0 commit comments

Comments
 (0)