Skip to content

Commit f944445

Browse files
authored
Fix typo (#162)
1 parent b15c621 commit f944445

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

fixtures/set013/scoper.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ function (string $className): bool {
4444
//
4545
// For more see: https://github.com/humbug/php-scoper#patchers
4646
'patchers' => [
47-
function (string $filePath, string $prefix, string $content): string {
47+
function (string $filePath, string $prefix, string $contents): string {
4848
// Change the content here.
4949

50-
return $content;
50+
return $contents;
5151
},
5252
],
5353

scoper.inc.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
Finder::class,
4141
],
4242
'patchers' => [
43-
function (string $filePath, string $prefix, string $content): string {
43+
function (string $filePath, string $prefix, string $contents): string {
4444
//
4545
// PHP-Parser patch
4646
//
@@ -49,7 +49,7 @@ function (string $filePath, string $prefix, string $content): string {
4949
return preg_replace(
5050
'%if \(defined\(\$name = \'PhpParser\\\\\\\\Parser\\\\\\\\Tokens%',
5151
'if (defined($name = \''.$prefix.'\\\\\\\\PhpParser\\\\\\\\Parser\\\\\\\\Tokens',
52-
$content
52+
$contents
5353
);
5454
}
5555

@@ -59,16 +59,16 @@ function (string $filePath, string $prefix, string $content): string {
5959
return preg_replace(
6060
'%rtrim\(get_class\(\$this\), \'_\'\), 15\)%',
6161
sprintf('rtrim(get_class($this), \'_\'), %d)', $length),
62-
$content
62+
$contents
6363
);
6464
}
6565

66-
return $content;
66+
return $contents;
6767
},
68-
function (string $filePath, string $prefix, string $content): string {
68+
function (string $filePath, string $prefix, string $contents): string {
6969
$finderClass = sprintf('\%s\%s', $prefix, Finder::class);
7070

71-
return str_replace($finderClass, '\\'.Finder::class, $content);
71+
return str_replace($finderClass, '\\'.Finder::class, $contents);
7272
},
7373
],
7474
];

src/Scoper/Composer/AutoloadPrefixer.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@
2020
final class AutoloadPrefixer
2121
{
2222
/**
23-
* @param array $content Decoded JSON
23+
* @param array $contents Decoded JSON
2424
* @param string $prefix
2525
*
2626
* @return array Prefixed decoded JSON
2727
*/
28-
public static function prefixPackageAutoloads(array $content, string $prefix): array
28+
public static function prefixPackageAutoloads(array $contents, string $prefix): array
2929
{
30-
if (isset($content['autoload'])) {
31-
$content['autoload'] = self::prefixAutoloads($content['autoload'], $prefix);
30+
if (isset($contents['autoload'])) {
31+
$contents['autoload'] = self::prefixAutoloads($contents['autoload'], $prefix);
3232
}
3333

34-
if (isset($content['autoload-dev'])) {
35-
$content['autoload-dev'] = self::prefixAutoloads($content['autoload-dev'], $prefix);
34+
if (isset($contents['autoload-dev'])) {
35+
$contents['autoload-dev'] = self::prefixAutoloads($contents['autoload-dev'], $prefix);
3636
}
3737

38-
return $content;
38+
return $contents;
3939
}
4040

4141
private static function prefixAutoloads(array $autoload, string $prefix): array

src/scoper.inc.php.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ return [
3737
//
3838
// For more see: https://github.com/humbug/php-scoper#patchers
3939
'patchers' => [
40-
function (string $filePath, string $prefix, string $content): string {
41-
// Change the content here.
40+
function (string $filePath, string $prefix, string $contents): string {
41+
// Change the contents here.
4242
43-
return $content;
43+
return $contents;
4444
},
4545
],
4646

0 commit comments

Comments
 (0)