Annotation parser plain value types

Showing 1-1 of 1 messages
Annotation parser plain value types maX 2/1/11 6:57 AM

we are using annotations for describing visual components in our application.

class SomeGrid {
     *  @GRID:Column(header="Reg. plate", width=80, editable=TRUE, hidden=FALSE, tooltip="Registration plate", align="left", sortable=TRUE)
    public $regPlate;


After processed by annotation reader becomes:

(object) Grid\Annotations\Column {
    "header"   => (string) "Reg. plate"
    "width"    => (string) "80"
    "editable" => (bool)   true
    "hidden"   => (bool)   false
    "tooltip"  => (string) "Registration plate"
    "align"    => (string) "left"
    "sortable" => (bool)   true

You can see the value of the width property is string even I didn't use quotes in the annotation.
The same happens with float values, but true and false values become, correctly, bool.

I found this happens because of the following fragment of code in \Doctrine\Common\Annotations\Parser and could be easily corrected by prefixing the value with the corresponding type cast (marked in red).

    case Lexer::T_STRING:
        return $this->lexer->token['value'];
    case Lexer::T_INTEGER:
        return (int)$this->lexer->token['value'];
    case Lexer::T_FLOAT:
        return (float)$this->lexer->token['value'];
    case Lexer::T_TRUE:
    return true;
    case Lexer::T_FALSE:
        return false;

question is, is this a desired behavior or is there any other reason for returning integer and float values as strings?
Do you think this would be worth reporting as a bug?