File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ private function getBlockIndentationIndicator(string $value): string
169
169
// http://www.yaml.org/spec/1.2/spec.html#id2793979
170
170
foreach ($ lines as $ line ) {
171
171
if ('' !== trim ($ line , ' ' )) {
172
- return ( ' ' === substr ( $ line , 0 , 1 ) ) ? (string ) $ this ->indentation : '' ;
172
+ return str_starts_with ( $ line , ' ' ) ? (string ) $ this ->indentation : '' ;
173
173
}
174
174
}
175
175
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ public static function requiresSingleQuoting(string $value): bool
80
80
81
81
// Determines if the PHP value contains any single characters that would
82
82
// cause it to require single quoting in YAML.
83
- return 0 < preg_match ('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ \- ? | < > = ! % @ ` \p{Zs}]/xu ' , $ value );
83
+ return 0 < preg_match ('/[\s \' "\:\{\}\[\],&\*\# \?] | \A[\-?|<>=!%@` \p{Zs}]/xu ' , $ value );
84
84
}
85
85
86
86
/**
You can’t perform that action at this time.
0 commit comments