I’m using
if (preg_match('/@type\s+([^\s]+)/', $refProp->getDocComment(), $matches)) {
return $matches[1];
} else {
return false;
}
to read a datatype like:
/**
*@type INT
*/
Here, I’ll get the ‘INT’ string.
Now, I’ll like to access the hole thing. Like:
/**
*@type INT NOT NULL DEFAUTL 1
*/
Including the whitespaces. How can I do it?
Thank you in advance!
Use the following expression: