#!/usr/bin/env php
<?php

/*
 * (c) Kévin Dunglas <dunglas@gmail.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

// installed via composer?
if (file_exists(__DIR__ . '/../../../autoload.php')) {
    require_once __DIR__ . '/../../../autoload.php';
} else {
    require_once __DIR__.'/../vendor/autoload.php';
}

use Symfony\Component\Console\Application;
use ApiPlatform\SchemaGenerator\Command\ExtractCardinalitiesCommand;
use ApiPlatform\SchemaGenerator\Command\DumpConfigurationCommand;
use ApiPlatform\SchemaGenerator\Command\GenerateCommand;

$application = new Application();
$application->add(new ExtractCardinalitiesCommand());
$application->add(new DumpConfigurationCommand());
$application->add(new GenerateCommand());
$application->run();
