#!/usr/bin/env php

<?php

/**
 * This file is part of Ibuildings QA-Tools.
 *
 * (c) Ibuildings
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

// Bootstrap
$baseDir = realpath(__DIR__ . '/../../../../');
$packageBaseDir = realpath(__DIR__ . '/../');

require_once $baseDir . '/vendor/autoload.php';

use \Ibuildings\QA\Tools\Common\Application;
use \Ibuildings\QA\Tools\Common\Settings;

$appConfig = new Settings($baseDir, $packageBaseDir);

$application = new Application('Ibuildings QA Tools Setup', $appConfig);

$application->add(new \Ibuildings\QA\Tools\Common\Console\InstallCommand());
$application->add(new \Ibuildings\QA\Tools\Javascript\Console\InstallJsHintCommand());
$application->add(new \Ibuildings\QA\Tools\Common\Console\InstallPreCommitHookCommand());
$application->add(new \Ibuildings\QA\Tools\Common\Console\ChangeSetPreCommitCommand());
$application->add(new \Ibuildings\QA\Tools\Common\Console\RunCommand());

$application->run();
