Skip to content
This repository was archived by the owner on Dec 7, 2019. It is now read-only.

Commit 8bab848

Browse files
committed
Merge pull request #93 in master
2 parents 784d29a + 31f0872 commit 8bab848

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ZFTool/Controller/ClassmapController.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ public function generateAction()
189189
$maxWidth = max($maxWidth, strlen($match[1]));
190190
}
191191

192-
$content = preg_replace('(\n\s+([^=]+)=>)e', "'\n \\1' . str_repeat(' ', " . $maxWidth . " - strlen('\\1')) . '=>'", $content);
192+
$content = preg_replace_callback('(\n\s+([^=]+)=>)', function ($match) use ($maxWidth) {
193+
return "\n " . $match[1] . str_repeat(' ', $maxWidth - strlen($match[1])) . '=>';
194+
}, $content);
193195

194196
if (!$usingStdout) {
195197
$console->writeLine(" DONE" . PHP_EOL, Color::GREEN);

0 commit comments

Comments
 (0)