Skip to content

Commit 63dd9f8

Browse files
committed
Leverage str_ends_with
added the php80 polyfill to requirements when necessary
1 parent 5a443a9 commit 63dd9f8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Caster/ClassStub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __construct(string $identifier, $callable = null)
6565
$s = ReflectionCaster::castFunctionAbstract($r, [], new Stub(), true, Caster::EXCLUDE_VERBOSE);
6666
$s = ReflectionCaster::getSignature($s);
6767

68-
if ('()' === substr($identifier, -2)) {
68+
if (str_ends_with($identifier, '()')) {
6969
$this->value = substr_replace($identifier, $s, -2);
7070
} else {
7171
$this->value .= $s;

Dumper/CliDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ protected function style($style, $value, $attr = [])
479479
} else {
480480
$value = "\033[{$this->styles[$style]}m".$value;
481481
}
482-
if ($cchrCount && $endCchr === substr($value, -\strlen($endCchr))) {
482+
if ($cchrCount && str_ends_with($value, $endCchr)) {
483483
$value = substr($value, 0, -\strlen($endCchr));
484484
} else {
485485
$value .= "\033[{$this->styles['default']}m";

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": ">=7.1.3",
2020
"symfony/polyfill-mbstring": "~1.0",
2121
"symfony/polyfill-php72": "~1.5",
22-
"symfony/polyfill-php80": "^1.15"
22+
"symfony/polyfill-php80": "^1.16"
2323
},
2424
"require-dev": {
2525
"ext-iconv": "*",

0 commit comments

Comments
 (0)