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

Commit

Permalink
Merge pull request #93 in master
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks3w committed Apr 22, 2014
2 parents 784d29a + 31f0872 commit 8bab848
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ZFTool/Controller/ClassmapController.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ public function generateAction()
$maxWidth = max($maxWidth, strlen($match[1]));
}

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

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

0 comments on commit 8bab848

Please sign in to comment.