Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions bin/php-matrix
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ declare(strict_types=1);

namespace TypistTech\PhpMatrix;

use TypistTech\PhpMatrix\Console\Runner;
use function in_array;
use const PHP_EOL;
use const PHP_SAPI;

use TypistTech\PhpMatrix\Console\Runner;

use function in_array;

// Taken from https://box-project.github.io/box/faq/#what-is-the-canonical-way-to-write-a-cli-entry-file
if (!in_array(PHP_SAPI, ['micro', 'cli', 'phpdbg', 'embed'], true)) {
echo PHP_EOL . 'This app may only be invoked from a command line, got "' . PHP_SAPI . '"' . PHP_EOL;
if (! in_array(PHP_SAPI, ['micro', 'cli', 'phpdbg', 'embed'], true)) {
echo PHP_EOL.'This app may only be invoked from a command line, got "'.PHP_SAPI.'"'.PHP_EOL;
exit(1);
}

include $_composer_autoload_path ?? __DIR__ . '/../vendor/autoload.php';
include $_composer_autoload_path ?? __DIR__.'/../vendor/autoload.php';

Runner::run();
2 changes: 1 addition & 1 deletion bin/update-all-versions
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ $dir = __DIR__.'/../data';
@mkdir($dir, 0755);

$content = json_encode($data, JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
file_put_contents($dir .'/all-versions.json', $content);
file_put_contents($dir.'/all-versions.json', $content);

echo "Done: '{$dir}/all-versions.json' updated".PHP_EOL;
Loading