From 05ea79929aa099d25b543f4a86db721f5f7e700e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 18 Nov 2019 12:11:56 +0300 Subject: Add phpsqllint for check sql queries --- tools/php-sqllint/bin/php-sqllint | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 tools/php-sqllint/bin/php-sqllint (limited to 'tools/php-sqllint/bin') diff --git a/tools/php-sqllint/bin/php-sqllint b/tools/php-sqllint/bin/php-sqllint new file mode 100755 index 000000000..fd766bc07 --- /dev/null +++ b/tools/php-sqllint/bin/php-sqllint @@ -0,0 +1,31 @@ +#!/usr/bin/env php + + * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3 + * @link http://cweiske.de/php-sqllint.htm + */ +namespace phpsqllint; + +if (file_exists(__DIR__ . '/../vendor/autoload.php')) { + //local git checkout + include_once __DIR__ . '/../vendor/autoload.php'; +} else if (file_exists('vendor/autoload.php')) { + //dependency composer installation + include_once 'vendor/autoload.php'; +} + +if (file_exists(__DIR__ . '/../src/phpsqllint/Autoloader.php')) { + include_once __DIR__ . '/../src/phpsqllint/Autoloader.php'; + Autoloader::register(); +} + +$cli = new Cli(); +$cli->run(); +?> \ No newline at end of file -- cgit v1.2.3-70-g09d2