mirror of
https://github.com/rectorphp/rector.git
synced 2024-07-11 12:03:30 +00: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
|
// 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 {
|
function (string $filePath, string $prefix, string $content): string {
|
||||||
// skip vendor, expect rector packages
|
// skip vendor, expect rector packages
|
||||||
|
|
Loading…
Reference in New Issue
Block a user