PHP code example of digitalkaoz / typehint-to-docblock
1. Go to this page and download the library: Download digitalkaoz/typehint-to-docblock library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
digitalkaoz / typehint-to-docblock example snippets
namespace Foo\Bar;
use Lol\Cat;
use Bar\Bazz;
class Test
{
function it_can_do_something(Cat $cat, Bazz $bazz)
{
}
}
namespace Foo\Bar;
use Lol\Cat;
use Bar\Bazz;
class Test
{
/**
* it_can_do_something
*
* @param \Lol\Cat $cat
* @param \Bar\Bazz $bazz
*/
function it_can_do_something($cat, $bazz)
{
}
}
yml
php:
- 7.0
before_script:
- bash -c 'if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then wget https://github.com/digitalkaoz/typehint-to-docblock/releases/download/0.2.2/typehint-to-docblock.phar && php typehint-to-docblock.phar transform spec; fi;'