1. Go to this page and download the library: Download typisttech/imposter 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/ */
typisttech / imposter example snippets
use TypistTech\Imposter\ImposterFactory;
$imposter = ImposterFactory::forProject('/path/to/project/root');
$imposter->run();
namespace Dummy\File;
use AnotherDummy\{
SubAnotherDummy, SubOtherDummy
};
use Composer;
use Composer\Plugin\PluginInterface;
use Dummy\SubOtherDummy;
use OtherDummy\SubOtherDummy;
use RuntimeException;
use \UnexpectedValueException;
use function OtherVendor\myFunc;
use const OtherVendor\MY_MAGIC_NUMBER;
$closure = function () use ($aaa) {
// Just testing.
};
class DummyClass
{
public function useClosure()
{
array_map(function () use ($xxx) {
// Just testing.
}, []);
}
}
function dummyFunction(string $namespace = null, string $use = null): array
{
if (! is_null($namespace) && $namespace === 'dummy string' && $use === 'dummy string') {
// Just testing.
}
return [];
}
foreach ([] as $namespace => $prefix) {
$aaaa = '{' . $namespace . '}' . $prefix;
}
/** Just a comment for testing $namespace transformation */
namespace MyPlugin\Vendor\Dummy\File;
use MyPlugin\Vendor\AnotherDummy\{
SubAnotherDummy, SubOtherDummy
};
use Composer;
use Composer\Plugin\PluginInterface;
use MyPlugin\Vendor\Dummy\SubOtherDummy;
use MyPlugin\Vendor\OtherDummy\SubOtherDummy;
use RuntimeException;
use \UnexpectedValueException;
use function MyPlugin\Vendor\OtherVendor\myFunc;
use const MyPlugin\Vendor\OtherVendor\MY_MAGIC_NUMBER;
$closure = function () use ($aaa) {
// Just testing.
};
class DummyClass
{
public function useClosure()
{
array_map(function () use ($xxx) {
// Just testing.
}, []);
}
}
function dummyFunction(string $namespace = null, string $use = null): array
{
if (! is_null($namespace) && $namespace === 'dummy string' && $use === 'dummy string') {
// Just testing.
}
return [];
}
foreach ([] as $namespace => $prefix) {
$aaaa = '{' . $namespace . '}' . $prefix;
}
/** Just a comment for testing $namespace transformation */
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.