summaryrefslogtreecommitdiff
path: root/tools/php-sqllint/bin
diff options
context:
space:
mode:
authorKenpachi2k13 <3476227+Kenpachi2k13@users.noreply.github.com>2020-05-05 01:00:27 +0200
committerGitHub <noreply@github.com>2020-05-05 01:00:27 +0200
commit66607bfbfe197a5fec86dd1efe34a2da80929648 (patch)
treeed0e97ddc134c82067a436ea3ffd67f2f46be60b /tools/php-sqllint/bin
parent3f6b7497531f9ace331ca74d271898e938245c04 (diff)
parent944d8489f1bcca93e6b2ff06a159084f064dce12 (diff)
downloadhercules-66607bfbfe197a5fec86dd1efe34a2da80929648.tar.gz
hercules-66607bfbfe197a5fec86dd1efe34a2da80929648.tar.bz2
hercules-66607bfbfe197a5fec86dd1efe34a2da80929648.tar.xz
hercules-66607bfbfe197a5fec86dd1efe34a2da80929648.zip
Merge branch 'master' into configure_newopt
Diffstat (limited to 'tools/php-sqllint/bin')
-rwxr-xr-xtools/php-sqllint/bin/php-sqllint31
1 files changed, 31 insertions, 0 deletions
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
+<?php
+/**
+ * SQL linter (syntax checker) written in PHP
+ *
+ * PHP version 5
+ *
+ * @category Tools
+ * @package PHP-SQLlint
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @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