beberlei / litecqrs-php

Small convention based CQRS library for PHP
MIT License
553 stars 47 forks source link

Fix Symfony Plugin's DebugCommand output #34

Closed mbadolato closed 11 years ago

mbadolato commented 11 years ago

The output was not displaying correctly:

1) The Command output displayed nothing because the if statement was comparing MethodName() to MethodNameCommand(), thus it would never match, so continue was always executed

2) Formatting for command and event output was displaying incorrectly when the command or event id was shorter than the actual column header text.

Issues solved by:

1) Fixing the method name check to strip off 'Command' from the end before doing the comparison against MethodName()

2) Intialized the maxFoo variables to the column header text's length instead of 0, to ensure they'd always be a minium of the column header length, thus formatting fixed