Skip to content

Commit 5d93f42

Browse files
committed
Added "scalar" as a recognized keyword (phpDocumentor/phpDocumentor#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).
1 parent eb83d81 commit 5d93f42

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

composer.lock

Lines changed: 17 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/phpDocumentor/Reflection/DocBlock/Type/Collection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ class Collection extends \ArrayObject
3434
const OPERATOR_NAMESPACE = '\\';
3535

3636
/** @var string[] List of recognized keywords */
37-
protected $keywords = array(
37+
protected static $keywords = array(
3838
'string', 'int', 'integer', 'bool', 'boolean', 'float', 'double',
39-
'object', 'mixed', 'array', 'resource', 'void', 'null',
39+
'object', 'mixed', 'array', 'resource', 'void', 'null', 'scalar',
4040
'callback', 'callable', 'false', 'true', 'self', '$this', 'static'
4141
);
4242

@@ -199,7 +199,7 @@ protected function isTypeAnArray($type)
199199
*/
200200
protected function isTypeAKeyword($type)
201201
{
202-
return in_array(strtolower($type), $this->keywords, true);
202+
return in_array(strtolower($type), static::$keywords, true);
203203
}
204204

205205
/**

0 commit comments

Comments
 (0)