Generate API documentation alpha

Cloud based service which generates API documentation for your GitHub based project using the great documentation generator ApiGen.

Status of Doctrine Cache (doctrine/cache)

Command: php -dmemory_limit=1024M /var/www/projects/apigen/apigen/apigen.php -s '/var/www/projects/apigen/repos/doctrine/cache/lib/Doctrine' -d '/var/www/projects/apigen/doc-progress/doctrine/cache' --charset=auto --download --debug --colors=no --progressbar=yes -
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/newrelic.so' - /usr/lib/php5/20131226/newrelic.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/newrelic.so' - /usr/lib/php5/20131226/newrelic.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Deprecated:  iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in .../apigen/vendor/Nette/Nette/loader.php on line 30
ApiGen 3.0dev
-------------
Scanning .../repos/doctrine/cache/lib/Doctrine
[===============================================================>] 100.00%  14MB
Found 7 errors

1. The TokenReflection library threw an exception while parsing the file .../repos/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php.

This can have two reasons: a) the source code in the file is not valid or b) you have just found a bug in the TokenReflection library.

If the license allows it please send the whole file or at least the following fragment describing where exacly is the problem along with the backtrace to apigen@apigen.org. Thank you!

The cause of the exception "Unexpected token found." was the : token (line 206) in the following part of Doctrine\Common\Cache\RiakCache::isExpired() source code:

 192:
 193:     protected function doGetStats()
 194:     {
 195:         // Only exposed through HTTP stats API, not Protocol Buffers API
 196:         return null;
 197:     }
 198:
 199:     /**
 200:      * Check if a given Riak Object have expired.
 201:      *
 202:      * @param \Riak\Object $object
 203:      *
 204:      * @return bool
 205:      */
*206:     private function isExpired(Object $object) : bool
 207:     {
 208:         $metadataMap = $object->getMetadataMap();
 209:
 210:         return isset($metadataMap[self::EXPIRES_HEADER])
 211:             && $metadataMap[self::EXPIRES_HEADER] < time();
 212:     }

The exception backtrace is following:

#0 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFunctionBase.php(302): TokenReflection\ReflectionFunctionBase->parseStaticVariables(Object(TokenReflection\Stream\StringStream))
#1 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFunctionBase->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#2 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#3 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#4 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionClass.php(1839): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#5 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionClass->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#6 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#7 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#8 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFileNamespace.php(299): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#9 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFileNamespace->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#10 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#11 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#12 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFile.php(130): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#13 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionFile->parseStream(Object(TokenReflection\Stream\StringStream), NULL)
#14 .../apigen/vendor/TokenReflection/TokenReflection/Broker.php(168): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker))
#15 .../apigen/ApiGen/Generator.php(216): TokenReflection\Broker->processString('<?php\n/*\n * THI...', '/var/www/projec...')
#16 .../apigen/ApiGen/Application.php(125): ApiGen\Generator->parse()
#17 .../apigen/ApiGen/Application.php(84): ApiGen\Application->parse()
#18 .../apigen/apigen.php(50): ApiGen\Application->run()
#19 {main}

2. The TokenReflection library threw an exception while parsing the file .../repos/doctrine/cache/lib/Doctrine/Common/Cache/LegacyMongoDBCache.php.

This can have two reasons: a) the source code in the file is not valid or b) you have just found a bug in the TokenReflection library.

If the license allows it please send the whole file or at least the following fragment describing where exacly is the problem along with the backtrace to apigen@apigen.org. Thank you!

The cause of the exception "Unexpected token found." was the : token (line 177) in the following part of Doctrine\Common\Cache\LegacyMongoDBCache::isExpired() source code:

 164:
 165:             Cache::STATS_MEMORY_USAGE => $collStats['size'] ?? null,
 166:             Cache::STATS_MEMORY_AVAILABLE  => null,
 167:         ];
 168:     }
 169:
 170:     /**
 171:      * Check if the document is expired.
 172:      *
 173:      * @param array $document
 174:      *
 175:      * @return bool
 176:      */
*177:     private function isExpired(array $document) : bool
 178:     {
 179:         return isset($document[MongoDBCache::EXPIRATION_FIELD]) &&
 180:             $document[MongoDBCache::EXPIRATION_FIELD] instanceof MongoDate &&
 181:             $document[MongoDBCache::EXPIRATION_FIELD]->sec < time();
 182:     }

The exception backtrace is following:

#0 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFunctionBase.php(302): TokenReflection\ReflectionFunctionBase->parseStaticVariables(Object(TokenReflection\Stream\StringStream))
#1 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFunctionBase->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#2 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#3 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#4 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionClass.php(1839): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#5 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionClass->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#6 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#7 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#8 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFileNamespace.php(299): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#9 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFileNamespace->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#10 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#11 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#12 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFile.php(130): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#13 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionFile->parseStream(Object(TokenReflection\Stream\StringStream), NULL)
#14 .../apigen/vendor/TokenReflection/TokenReflection/Broker.php(168): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker))
#15 .../apigen/ApiGen/Generator.php(216): TokenReflection\Broker->processString('<?php\n/*\n * THI...', '/var/www/projec...')
#16 .../apigen/ApiGen/Application.php(125): ApiGen\Generator->parse()
#17 .../apigen/ApiGen/Application.php(84): ApiGen\Application->parse()
#18 .../apigen/apigen.php(50): ApiGen\Application->run()
#19 {main}

3. The TokenReflection library threw an exception while parsing the file .../repos/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php.

This can have two reasons: a) the source code in the file is not valid or b) you have just found a bug in the TokenReflection library.

If the license allows it please send the whole file or at least the following fragment describing where exacly is the problem along with the backtrace to apigen@apigen.org. Thank you!

The cause of the exception "Unexpected token found." was the : token (line 220) in the following part of Doctrine\Common\Cache\FileCache::createPathIfNeeded() source code:

 208:
 209:             Cache::STATS_MEMORY_USAGE       => $usage,
 210:             Cache::STATS_MEMORY_AVAILABLE   => $free,
 211:         ];
 212:     }
 213:
 214:     /**
 215:      * Create path if needed.
 216:      *
 217:      * @param string $path
 218:      * @return bool TRUE on success or if path already exists, FALSE if path cannot be created.
 219:      */
*220:     private function createPathIfNeeded(string $path) : bool
 221:     {
 222:         if ( ! is_dir($path)) {
 223:             if (false === @mkdir($path, 0777 & (~$this->umask), true) && !is_dir($path)) {
 224:                 return false;
 225:             }

The exception backtrace is following:

#0 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFunctionBase.php(302): TokenReflection\ReflectionFunctionBase->parseStaticVariables(Object(TokenReflection\Stream\StringStream))
#1 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFunctionBase->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#2 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#3 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#4 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionClass.php(1839): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#5 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionClass->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#6 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#7 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#8 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFileNamespace.php(299): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#9 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFileNamespace->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#10 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#11 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#12 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFile.php(130): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#13 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionFile->parseStream(Object(TokenReflection\Stream\StringStream), NULL)
#14 .../apigen/vendor/TokenReflection/TokenReflection/Broker.php(168): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker))
#15 .../apigen/ApiGen/Generator.php(216): TokenReflection\Broker->processString('<?php\n/*\n * THI...', '/var/www/projec...')
#16 .../apigen/ApiGen/Application.php(125): ApiGen\Generator->parse()
#17 .../apigen/ApiGen/Application.php(84): ApiGen\Application->parse()
#18 .../apigen/apigen.php(50): ApiGen\Application->run()
#19 {main}

4. The TokenReflection library threw an exception while parsing the file .../repos/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php.

This can have two reasons: a) the source code in the file is not valid or b) you have just found a bug in the TokenReflection library.

If the license allows it please send the whole file or at least the following fragment describing where exacly is the problem along with the backtrace to apigen@apigen.org. Thank you!

The cause of the exception "Unexpected token found." was the : token (line 114) in the following part of Doctrine\Common\Cache\PhpFileCache::includeFileForId() source code:

 102:
 103:             $code   = sprintf('<?php return unserialize(%s);', $value);
 104:         }
 105:
 106:         return $this->writeFile($filename, $code);
 107:     }
 108:
 109:     /**
 110:      * @param string $id
 111:      *
 112:      * @return array|null
 113:      */
*114:     private function includeFileForId(string $id) : ?array
 115:     {
 116:         $fileName = $this->getFilename($id);
 117:
 118:         // note: error suppression is still faster than `file_exists`, `is_file` and `is_readable`
 119:         set_error_handler(self::$emptyErrorHandler);
 120:
 121:         $value = include $fileName;
 122:
 123:         restore_error_handler

The exception backtrace is following:

#0 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFunctionBase.php(302): TokenReflection\ReflectionFunctionBase->parseStaticVariables(Object(TokenReflection\Stream\StringStream))
#1 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFunctionBase->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#2 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#3 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#4 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionClass.php(1839): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#5 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionClass->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#6 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#7 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#8 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFileNamespace.php(299): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#9 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFileNamespace->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#10 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#11 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#12 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFile.php(130): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#13 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionFile->parseStream(Object(TokenReflection\Stream\StringStream), NULL)
#14 .../apigen/vendor/TokenReflection/TokenReflection/Broker.php(168): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker))
#15 .../apigen/ApiGen/Generator.php(216): TokenReflection\Broker->processString('<?php\n/*\n * THI...', '/var/www/projec...')
#16 .../apigen/ApiGen/Application.php(125): ApiGen\Generator->parse()
#17 .../apigen/ApiGen/Application.php(84): ApiGen\Application->parse()
#18 .../apigen/apigen.php(50): ApiGen\Application->run()
#19 {main}

5. The TokenReflection library threw an exception while parsing the file .../repos/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php.

This can have two reasons: a) the source code in the file is not valid or b) you have just found a bug in the TokenReflection library.

If the license allows it please send the whole file or at least the following fragment describing where exacly is the problem along with the backtrace to apigen@apigen.org. Thank you!

The cause of the exception "Unexpected token found." was the : token (line 192) in the following part of Doctrine\Common\Cache\CacheProvider::getNamespacedId() source code:

 177:
 178:
 179:             return true;
 180:         }
 181:
 182:         return false;
 183:     }
 184:
 185:     /**
 186:      * Prefixes the passed id with the configured namespace value.
 187:      *
 188:      * @param string $id The id to namespace.
 189:      *
 190:      * @return string The namespaced id.
 191:      */
*192:     private function getNamespacedId(string $id) : string
 193:     {
 194:         $namespaceVersion  = $this->getNamespaceVersion();
 195:
 196:         return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion);
 197:     }
 198:
 199:     /**
 200:      * Returns the namespace cache key.
 201:      *
 202:      * @return string
 203:      */

The exception backtrace is following:

#0 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFunctionBase.php(302): TokenReflection\ReflectionFunctionBase->parseStaticVariables(Object(TokenReflection\Stream\StringStream))
#1 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFunctionBase->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#2 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#3 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#4 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionClass.php(1839): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#5 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionClass->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#6 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#7 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#8 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFileNamespace.php(299): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#9 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFileNamespace->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#10 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#11 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#12 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFile.php(130): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#13 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionFile->parseStream(Object(TokenReflection\Stream\StringStream), NULL)
#14 .../apigen/vendor/TokenReflection/TokenReflection/Broker.php(168): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker))
#15 .../apigen/ApiGen/Generator.php(216): TokenReflection\Broker->processString('<?php\n/*\n * THI...', '/var/www/projec...')
#16 .../apigen/ApiGen/Application.php(125): ApiGen\Generator->parse()
#17 .../apigen/ApiGen/Application.php(84): ApiGen\Application->parse()
#18 .../apigen/apigen.php(50): ApiGen\Application->run()
#19 {main}

6. The TokenReflection library threw an exception while parsing the file .../repos/doctrine/cache/lib/Doctrine/Common/Cache/ExtMongoDBCache.php.

This can have two reasons: a) the source code in the file is not valid or b) you have just found a bug in the TokenReflection library.

If the license allows it please send the whole file or at least the following fragment describing where exacly is the problem along with the backtrace to apigen@apigen.org. Thank you!

The cause of the exception "Unexpected token found." was the : token (line 206) in the following part of ExtMongoDBCache::isExpired() source code:

 193:
 194:             Cache::STATS_MEMORY_USAGE => $memoryUsage,
 195:             Cache::STATS_MEMORY_AVAILABLE  => null,
 196:         ];
 197:     }
 198:
 199:     /**
 200:      * Check if the document is expired.
 201:      *
 202:      * @param BSONDocument $document
 203:      *
 204:      * @return bool
 205:      */
*206:     private function isExpired(BSONDocument $document): bool
 207:     {
 208:         return isset($document[MongoDBCache::EXPIRATION_FIELD]) &&
 209:             $document[MongoDBCache::EXPIRATION_FIELD] instanceof UTCDateTime &&
 210:             $document[MongoDBCache::EXPIRATION_FIELD]->toDateTime() < new \DateTime();
 211:     }

The exception backtrace is following:

#0 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFunctionBase.php(302): TokenReflection\ReflectionFunctionBase->parseStaticVariables(Object(TokenReflection\Stream\StringStream))
#1 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFunctionBase->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#2 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#3 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#4 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionClass.php(1839): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#5 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionClass->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#6 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#7 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#8 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFileNamespace.php(299): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#9 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFileNamespace->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#10 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#11 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#12 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFile.php(121): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#13 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionFile->parseStream(Object(TokenReflection\Stream\StringStream), NULL)
#14 .../apigen/vendor/TokenReflection/TokenReflection/Broker.php(168): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker))
#15 .../apigen/ApiGen/Generator.php(216): TokenReflection\Broker->processString('<?php\n\ndeclare(...', '/var/www/projec...')
#16 .../apigen/ApiGen/Application.php(125): ApiGen\Generator->parse()
#17 .../apigen/ApiGen/Application.php(84): ApiGen\Application->parse()
#18 .../apigen/apigen.php(50): ApiGen\Application->run()
#19 {main}

7. The TokenReflection library threw an exception while parsing the file .../repos/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php.

This can have two reasons: a) the source code in the file is not valid or b) you have just found a bug in the TokenReflection library.

If the license allows it please send the whole file or at least the following fragment describing where exacly is the problem along with the backtrace to apigen@apigen.org. Thank you!

The cause of the exception "Unexpected token found." was the : token (line 166) in the following part of Doctrine\Common\Cache\SQLite3Cache::findById() source code:

 147:
 148:     }
 149:
 150:     /**
 151:      * {@inheritdoc}
 152:      */
 153:     protected function doGetStats()
 154:     {
 155:         // no-op.
 156:     }
 157:
 158:     /**
 159:      * Find a single row by ID.
 160:      *
 161:      * @param mixed $id
 162:      * @param bool $includeData
 163:      *
 164:      * @return array|null
 165:      */
*166:     private function findById($id, bool $includeData = true) : ?array
 167:     {
 168:         list($idField) = $fields = $this->getFields();
 169:
 170:         if (!$includeData) {
 171:             $key = array_search(static::DATA_FIELD, $fields);
 172:             unset

The exception backtrace is following:

#0 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFunctionBase.php(302): TokenReflection\ReflectionFunctionBase->parseStaticVariables(Object(TokenReflection\Stream\StringStream))
#1 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFunctionBase->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#2 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionClass))
#3 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#4 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionClass.php(1839): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionClass))
#5 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionClass->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#6 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFileNamespace))
#7 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#8 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFileNamespace.php(299): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFileNamespace))
#9 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(122): TokenReflection\ReflectionFileNamespace->parseChildren(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#10 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionElement->parseStream(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\ReflectionFile))
#11 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionElement.php(104): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#12 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionFile.php(130): TokenReflection\ReflectionElement->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker), Object(TokenReflection\ReflectionFile))
#13 .../apigen/vendor/TokenReflection/TokenReflection/ReflectionBase.php(73): TokenReflection\ReflectionFile->parseStream(Object(TokenReflection\Stream\StringStream), NULL)
#14 .../apigen/vendor/TokenReflection/TokenReflection/Broker.php(168): TokenReflection\ReflectionBase->__construct(Object(TokenReflection\Stream\StringStream), Object(TokenReflection\Broker))
#15 .../apigen/ApiGen/Generator.php(216): TokenReflection\Broker->processString('<?php\n/*\n * THI...', '/var/www/projec...')
#16 .../apigen/ApiGen/Application.php(125): ApiGen\Generator->parse()
#17 .../apigen/ApiGen/Application.php(84): ApiGen\Application->parse()
#18 .../apigen/apigen.php(50): ApiGen\Application->run()
#19 {main}

Found 23 classes, 0 constants, 0 functions and other 4 used PHP internal classes
Documentation for 19 classes, 0 constants, 0 functions and other 4 used PHP internal classes will be generated
Generating to directory .../doc-progress/doctrine/cache
[===============================================================>] 100.00%  16MB
Done. Total time: 2 sec, used: 20 MB RAM