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

$files       = [__DIR__ . '/../vendor/autoload.php', __DIR__ . '/../../../autoload.php'];
$loader      = null;

foreach ($files as $file) {
  if (file_exists($file)) {
    $loader = require $file;

    break;
  }
}

if (! $loader) {
  throw new RuntimeException('vendor/autoload.php could not be found. Did you run `php composer.phar install`?');
}

use Digilist\SnakeDumper\Command\DumpCommand;
use Symfony\Component\Console\Application;

$application = new Application('SnakeDumper');
$application->add(new DumpCommand());
$application->run();
