File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public function __construct(string $name)
1414 $ name ,
1515 function (string $ value ): string {
1616 $ pattern = <<<'PHP'
17- (function () {
17+ (function () use ($input) {
1818 $resource = \tmpfile();
1919 if ($resource === false) {
2020 throw new \RuntimeException('Could not open temporary file.');
Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ public function __construct(string $name)
1414 $ name ,
1515 function (string $ value ): string {
1616 $ pattern = <<<'PHP'
17- (function ($data) {
17+ (function ($data) use ($input) {
1818 if (!is_string($data)) {
1919 return null;
2020 }
2121 $stream = fopen('php://temp', 'r+');
2222 fwrite($stream, $data);
2323 fseek($stream, 0, SEEK_SET);
2424 return $stream;
25- })(%s);
25+ })(%s)
2626 PHP;
2727
2828 return sprintf ($ pattern , $ value );
You can’t perform that action at this time.
0 commit comments