Bug #28327

Argument mapping falsely detects tags from method description - ReflectionService RegExp issue

Added by Robert Lemke over 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Should have
Category:
Reflection
Start date:
2011-07-20
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

Consider the following doc comment and method signature of a CommandController:

    /**
     * An example command
     *
     * The comment of this command method is also used for FLOW3's help screens. The first line should give a very short
     * summary about what the command does. Then, after an empty line, you should explain in more detail what the command
     * does. You might also give some usage example.
     *
     * It is important to document the parameters with @param tags, because that information will also appear in the help
     * screen.
     *
     * @param string $requiredArgument This argument is required
     * @param string $optionalArgument This argument is optional
     * @return void
     */
    public function exampleCommand($requiredArgument, $optionalArgument = NULL) {
        $this->view->appendContent('You called the example command.');
    }

The property mapper will fail on this command because the "@param tags," is detected as an argument definition and then the property mapper tries to convert the first argument into "tags," ... which it can't'.

Also available in: Atom PDF