summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Dorn <jeremy@jeremydorn.com>2012-05-23 09:27:21 -0700
committerJeremy Dorn <jeremy@jeremydorn.com>2012-05-23 09:27:21 -0700
commit94a3bfa3570f352bb9fe47831e54e8cb91064559 (patch)
treea5a997c5c35a25f0229b84f89b86bf7ea2f89f5f
parent638725ce8ebcfe244c31f24a7c1a40b609eb8ff3 (diff)
downloadsql-formatter-94a3bfa3570f352bb9fe47831e54e8cb91064559.zip
sql-formatter-94a3bfa3570f352bb9fe47831e54e8cb91064559.tar.gz
sql-formatter-94a3bfa3570f352bb9fe47831e54e8cb91064559.tar.bz2
If a reserved word is found, it now returns it in the original case instead
of all uppercase.
-rw-r--r--SqlFormatter.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/SqlFormatter.php b/SqlFormatter.php
index 74f1fab..1fe46da 100644
--- a/SqlFormatter.php
+++ b/SqlFormatter.php
@@ -159,7 +159,7 @@ class SqlFormatter {
if(in_array($word,self::$special_reserved)) $type = 'special reserved';
else $type = 'reserved';
- return $word;
+ return substr($string,0,strlen($word));
}
}