Generate API documentation alpha

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

Status of Ray.Di (koriym/Ray.Di)

Command: php -dmemory_limit=1024M /var/www/projects/apigen/apigen/apigen.php -s '/var/www/projects/apigen/repos/koriym/Ray.Di/' -d '/var/www/projects/apigen/doc-progress/koriym/Ray.Di' --charset=auto --download --debug --colors=no --progressbar=yes --title='Ray.Di
ApiGen 3.0dev
-------------
Scanning .../repos/koriym/Ray.Di
[===============================================================>] 100.00%  15MB
Found 10 errors

1. The TokenReflection library threw an exception while parsing the file .../repos/koriym/Ray.Di/docs/demo/01-linked-binding.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 20) in the following part of the source code:

 14:
 15:         $this->bind(ComputerInterface::class)->to(Computer::class);
 16:     }
 17: }
 18:
 19: $injector = new Injector(new LinkedBindingModule);
*20: $computer = $injector->getInstance(ComputerInterface::class);
 21: /* @var $computer Computer */
 22: $works = ($computer->lang instanceof Php);
 23:
 24: echo ($works ? 'It works!' : 'It DOES NOT work!') . PHP_EOL;
 25:

The exception backtrace is following:

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

2. The TokenReflection library threw an exception while parsing the file .../repos/koriym/Ray.Di/docs/demo/06-install.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 24) in the following part of the source code:

 18:
 19:         $this->bind(RobotInterface::class)->to(Robot::class);
 20:     }
 21: }
 22:
 23: $injector = new Injector(new InstallModule);
*24: $robot = $injector->getInstance(RobotInterface::class);
 25: /* @var $robot Robot */
 26: $works = $robot->isReady === true;
 27:
 28: echo ($works ? 'It works!' : 'It DOES NOT work!') . PHP_EOL;
 29:

The exception backtrace is following:

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

3. The TokenReflection library threw an exception while parsing the file .../repos/koriym/Ray.Di/docs/demo/03-provider-binding.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 20) in the following part of the source code:

 14:
 15:         $this->bind()->annotatedWith('php_version')->toInstance('7.0');
 16:     }
 17: }
 18:
 19: $injector = new Injector(new ProviderBindingModule);
*20: $computer = $injector->getInstance(Computer::class);
 21: /* @var $computer Computer */
 22: $works = ($computer->lang instanceof Php) && $computer->lang->version === '7.0';
 23:
 24: echo ($works ? 'It works!' : 'It DOES NOT work!') . PHP_EOL;
 25:

The exception backtrace is following:

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

4. The TokenReflection library threw an exception while parsing the file .../repos/koriym/Ray.Di/docs/demo/10-cache.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 25) in the following part of the source code:

 19:
 20:     }
 21: }
 22:
 23: $start = microtime(true);
 24: $injector = new Injector(new InstallModule);
*25: $robot1 = $injector->getInstance(RobotInterface::class);
 26: $time1 = microtime(true) - $start;
 27:
 28: // save file cache
 29: file_put_contents(__FILE__ . '.cache', serialize(new Injector(new InstallModule)));
 30:
 31: $start = microtime(true);
 32: $injector = unserialize(file_get_contents(__FILE__ . '.cache'));
 33: $robot2

The exception backtrace is following:

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

5. The TokenReflection library threw an exception while parsing the file .../repos/koriym/Ray.Di/docs/demo/02a-named-by-qualifier-annotation.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 20) in the following part of the source code:

 14:
 15:         $this->bind(LegInterface::class)->annotatedWith(Right::class)->to(RightLeg::class);
 16:     }
 17: }
 18:
 19: $injector = new Injector(new BindingAnnotationModule);
*20: $robot = $injector->getInstance(QualifierRobot::class);
 21: /* @var $robot Robot */
 22: $works = ($robot->leftLeg instanceof LeftLeg);
 23:
 24: echo ($works ? 'It works!' : 'It DOES NOT work!') . PHP_EOL;
 25:

The exception backtrace is following:

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

6. The TokenReflection library threw an exception while parsing the file .../repos/koriym/Ray.Di/docs/demo/04-untarget-bindings.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 20) in the following part of the source code:

 14:
 15:         $this->bind(Php::class)->in(Scope::SINGLETON);
 16:     }
 17: }
 18:
 19: $injector = new Injector(new UntargetBindingModule);
*20: $php1 = $injector->getInstance(Php::class);
 21: $php2 = $injector->getInstance(Php::class);
 22: /* @var $phpRobot Robot */
 23: $works = spl_object_hash($php1) === spl_object_hash($php2);
 24:
 25: echo ($works ? 'It works!' : 'It DOES NOT work!') . PHP_EOL;
 26:

The exception backtrace is following:

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

7. The TokenReflection library threw an exception while parsing the file .../repos/koriym/Ray.Di/docs/demo/11-script-injector.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 27) in the following part of the source code:

 21:
 22:     }
 23: }
 24:
 25: $start = microtime(true);
 26: $injector = new Injector(new InstallModule);
*27: $robot1 = $injector->getInstance(RobotInterface::class);
 28: $time1 = microtime(true) - $start;
 29:
 30: $tmpDir =  __DIR__ . '/tmp';
 31: $compiler = new DiCompiler(new InstallModule, $tmpDir);
 32: $compiler->compile();
 33:
 34: $start

The exception backtrace is following:

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

8. The TokenReflection library threw an exception while parsing the file .../repos/koriym/Ray.Di/docs/demo/02b-named-by-string.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 20) in the following part of the source code:

 14:
 15:         $this->bind(LegInterface::class)->annotatedWith('right')->to(RightLeg::class);
 16:     }
 17: }
 18:
 19: $injector = new Injector(new BindingAnnotationNamedModule);
*20: $robot = $injector->getInstance(NamedRobot::class);
 21: /* @var $robot NamedRobot */
 22: $works = ($robot->leftLeg instanceof LeftLeg);
 23:
 24: echo ($works ? 'It works!' : 'It DOES NOT work!') . PHP_EOL;
 25:

The exception backtrace is following:

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

9. The TokenReflection library threw an exception while parsing the file .../repos/koriym/Ray.Di/docs/demo/05-constructor-bindings.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 20) in the following part of the source code:

 14:
 15:         $this->bind(LangInterface::class)->toConstructor(Php::class, 'version=php_version');
 16:     }
 17: }
 18:
 19: $injector = new Injector(new ConstructorBindingModule);
*20: $php = $injector->getInstance(LangInterface::class);
 21: /* @var $php Php */
 22: $works = $php->version === '4.4';
 23:
 24: echo ($works ? 'It works!' : 'It DOES NOT work!') . PHP_EOL;
 25:

The exception backtrace is following:

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

10. The TokenReflection library threw an exception while parsing the file .../repos/koriym/Ray.Di/tests/bench.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 17) in the following part of the source code:

 11:
 12: $serialize = serialize($injector);
 13:
 14: $timer = microtime(true);
 15: foreach (range(1, $n) as $i) {
 16:     $injector = new Injector(new FakeCarModule);
*17:     $injector->getInstance(FakeCarInterface::class);
 18: }
 19:
 20: $timer1 = microtime(true) - $timer;
 21:
 22: $timer = microtime(true);
 23: $injector = unserialize($serialize);
 24: foreach

The exception backtrace is following:

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

Found 158 classes, 0 constants, 0 functions and other 8 used PHP internal classes
Documentation for 158 classes, 0 constants, 0 functions and other 8 used PHP internal classes will be generated
Generating to directory .../doc-progress/koriym/Ray.Di
[===============================================================>] 100.00%  41MB
Done. Total time: 11 sec, used: 41 MB RAM