Removed major problems reported by insight.sensiolabs.com

I have removed:

* FIXME : take into account user-defined field types
    Doctrine provides it in Type::addType('mytype', 'My\Project\Types\MyType'); and Type::getTypesMap(); . So it's not necessary to keep this comment. 
* // ; comment 
* __DIR__ magic constants