mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-29 19:37:55 +01:00
[Scoper] Patch : void in vendor via scoper-php70 config (#6312)
This commit is contained in:
parent
c183278243
commit
84bf36e984
@ -159,6 +159,18 @@ return [
|
||||
);
|
||||
},
|
||||
|
||||
function (string $filePath, string $prefix, string $content): string {
|
||||
if (! Strings::contains($filePath, 'vendor/')) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
// @see https://regex101.com/r/r3AJFl/1
|
||||
return Strings::replace(
|
||||
$content, '#\)\s{0,}:\s{0,}void#',
|
||||
")"
|
||||
);
|
||||
},
|
||||
|
||||
// unprefix string classes, as they're string on purpose - they have to be checked in original form, not prefixed
|
||||
function (string $filePath, string $prefix, string $content): string {
|
||||
// skip vendor, expect rector packages
|
||||
|
Loading…
x
Reference in New Issue
Block a user