1. Go to this page and download the library: Download adhocore/phint 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/ */
adhocore / phint example snippets
namespace Abc;
/**
* This is dummy class.
*
* It does nothing as of now.
* Maybe you could fix it?
*/
class Dummy
{
/**
* Alpha beta.
*
* Example:
*
* <code>
* $dummy = new Dummy;
* $dummy->alpha('john', true);
* // '...'
* </code>
*
* @param string $name
* @param bool $flag
*
* @return string|null
*/
public function alpha($name, $flag)
{
//
}
}
use Abc\Dummy;
\
alpha(string $name, bool $flag): string|null
\
$dummy = new Dummy;
$dummy->alpha('john', true);
// '...'
\
use Ahc\Dummy;
alpha(string $name, bool $flag): string|null
$dummy = new Dummy;
$dummy->alpha('john', true);
// '...'
namespace Abc\Test;
use Abc\Dummy;
use PHPUnit\Framework\TestCase as TestCase;
/**
* Auto generated by `phint test`.
*/
class DummyTest extends TestCase
{
/**
* @var Dummy
*/
protected $dummy;
public function setUp()
{
parent::setUp();
$this->dummy = new Dummy;
}
public function testAlpha()
{
$actual = $this->dummy->alpha();
// $this->assertSame('', $actual);
}
}