Added "scalar" as a recognized keyword (phpDocumentor/phpDocumentor2#694);

Changed the list of keywords to be static (for the purpose of reducing memory consumption);
Updated composer.lock with the latest dependencies (PHPUnit in particular).
This commit is contained in:
Vasil Rangelov
2012-12-02 22:26:45 +02:00
parent eb83d810de
commit 5d93f42598
2 changed files with 20 additions and 19 deletions
@@ -34,9 +34,9 @@ class Collection extends \ArrayObject
const OPERATOR_NAMESPACE = '\\';
/** @var string[] List of recognized keywords */
protected $keywords = array(
protected static $keywords = array(
'string', 'int', 'integer', 'bool', 'boolean', 'float', 'double',
'object', 'mixed', 'array', 'resource', 'void', 'null',
'object', 'mixed', 'array', 'resource', 'void', 'null', 'scalar',
'callback', 'callable', 'false', 'true', 'self', '$this', 'static'
);
@@ -199,7 +199,7 @@ class Collection extends \ArrayObject
*/
protected function isTypeAKeyword($type)
{
return in_array(strtolower($type), $this->keywords, true);
return in_array(strtolower($type), static::$keywords, true);
}
/**