bin/entity
#!/usr/bin/env php
<?php
declare(strict_types = 1);
function includeIfExists($file):bool
{
if (file_exists($file)) {
/** @noinspection PhpIncludeInspection */
return (include $file) !== false;
}
return false;
}
if ((!includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!includeIfExists(__DIR__ . '/../../../autoload.php'))) {
die('You must set up the project dependencies, run the following commands:' . PHP_EOL .
'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
'php composer.phar install' . PHP_EOL);
}
$application = new \Symfony\Component\Console\Application();
$application->setName("Entity Utils");
$application->setVersion("2.0.0");
$application->add(new \mheinzerling\entity\bin\GenerateCommand());
$application->run();