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 e2528539ac
commit 13466286b0
2 changed files with 20 additions and 19 deletions
Generated
+17 -16
View File
@@ -26,6 +26,7 @@
"dflydev\\markdown": "src" "dflydev\\markdown": "src"
} }
}, },
"notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"New BSD License" "New BSD License"
], ],
@@ -59,16 +60,16 @@
"packages-dev": [ "packages-dev": [
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "1.2.6", "version": "1.2.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "git://github.com/sebastianbergmann/php-code-coverage.git", "url": "git://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "1.2.6" "reference": "1.2.7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/sebastianbergmann/php-code-coverage/zipball/1.2.6", "url": "https://github.com/sebastianbergmann/php-code-coverage/archive/1.2.7.zip",
"reference": "1.2.6", "reference": "1.2.7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -81,7 +82,7 @@
"ext-dom": "*", "ext-dom": "*",
"ext-xdebug": ">=2.0.5" "ext-xdebug": ">=2.0.5"
}, },
"time": "2012-10-16 22:34:13", "time": "2012-12-02 14:54:55",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -295,16 +296,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "3.7.9", "version": "3.7.10",
"source": { "source": {
"type": "git", "type": "git",
"url": "git://github.com/sebastianbergmann/phpunit.git", "url": "git://github.com/sebastianbergmann/phpunit.git",
"reference": "3.7.9" "reference": "3.7.10"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/sebastianbergmann/phpunit/archive/3.7.9.zip", "url": "https://github.com/sebastianbergmann/phpunit/archive/3.7.10.zip",
"reference": "3.7.9", "reference": "3.7.10",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -313,7 +314,7 @@
"phpunit/php-text-template": ">=1.1.1", "phpunit/php-text-template": ">=1.1.1",
"phpunit/php-code-coverage": ">=1.2.1", "phpunit/php-code-coverage": ">=1.2.1",
"phpunit/php-timer": ">=1.0.2", "phpunit/php-timer": ">=1.0.2",
"phpunit/phpunit-mock-objects": ">=1.2.0", "phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0",
"symfony/yaml": ">=2.1.0", "symfony/yaml": ">=2.1.0",
"ext-dom": "*", "ext-dom": "*",
"ext-pcre": "*", "ext-pcre": "*",
@@ -326,7 +327,7 @@
"ext-simplexml": "*", "ext-simplexml": "*",
"ext-tokenizer": "*" "ext-tokenizer": "*"
}, },
"time": "2012-11-06 19:49:38", "time": "2012-12-02 14:56:55",
"bin": [ "bin": [
"composer/bin/phpunit" "composer/bin/phpunit"
], ],
@@ -417,23 +418,23 @@
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v2.1.3", "version": "v2.1.4",
"target-dir": "Symfony/Component/Yaml", "target-dir": "Symfony/Component/Yaml",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Yaml", "url": "https://github.com/symfony/Yaml",
"reference": "v2.1.3" "reference": "v2.1.4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/symfony/Yaml/zipball/v2.1.3", "url": "https://github.com/symfony/Yaml/archive/v2.1.4.zip",
"reference": "v2.1.3", "reference": "v2.1.4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"time": "2012-10-29 04:15:41", "time": "2012-11-08 09:51:48",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@@ -34,9 +34,9 @@ class Collection extends \ArrayObject
const OPERATOR_NAMESPACE = '\\'; const OPERATOR_NAMESPACE = '\\';
/** @var string[] List of recognized keywords */ /** @var string[] List of recognized keywords */
protected $keywords = array( protected static $keywords = array(
'string', 'int', 'integer', 'bool', 'boolean', 'float', 'double', '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' 'callback', 'callable', 'false', 'true', 'self', '$this', 'static'
); );
@@ -199,7 +199,7 @@ class Collection extends \ArrayObject
*/ */
protected function isTypeAKeyword($type) protected function isTypeAKeyword($type)
{ {
return in_array(strtolower($type), $this->keywords, true); return in_array(strtolower($type), static::$keywords, true);
} }
/** /**