Skip to content

Instantly share code, notes, and snippets.

@shin1x1
Created June 30, 2020 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shin1x1/01d6550c80ce369c9a14d03d7282be49 to your computer and use it in GitHub Desktop.
Save shin1x1/01d6550c80ce369c9a14d03d7282be49 to your computer and use it in GitHub Desktop.
#!/usr/bin/env php
<?php
use Koriym\Spaceman\Convert;
require __DIR__ . '/vendor/autoload.php';
if ($argc < 3) {
echo "Usage: spaceman NAMESPACE DIR", PHP_EOL;
exit(1);
}
$packageName = $argv[1];
$sourcePath = $argv[2];
$sourceAbsolutePath = realpath($sourcePath[0] === '/' ? $sourcePath : __DIR__ . '/' . $sourcePath);
(new Convert($packageName))($sourceAbsolutePath);
@shin1x1
Copy link
Author

shin1x1 commented Jun 30, 2020

$ php spaceman.php NAMESPACE DIR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment