diff options
author | Bruno Perel <brunoperel@gmail.com> | 2018-11-26 19:56:17 +0100 |
---|---|---|
committer | Bruno Perel <brunoperel@gmail.com> | 2018-11-26 20:08:52 +0100 |
commit | 513ed8175bdc0fc17a192ea29757cf8fee178c2a (patch) | |
tree | c87f72dcdc4d5f6f86e5da4d212e7be92cf9506c /src/Components/UnionKeyword.php | |
parent | 8e37bb398b9bf7449c6855f3e0639156cef35e7e (diff) | |
download | sql-parser-513ed8175bdc0fc17a192ea29757cf8fee178c2a.zip sql-parser-513ed8175bdc0fc17a192ea29757cf8fee178c2a.tar.gz sql-parser-513ed8175bdc0fc17a192ea29757cf8fee178c2a.tar.bz2 |
Cleanup and improve readability:
Avoid duplicate if conditions
Use switch/case instead of ifs when possible
Diffstat (limited to 'src/Components/UnionKeyword.php')
-rw-r--r-- | src/Components/UnionKeyword.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Components/UnionKeyword.php b/src/Components/UnionKeyword.php index 4aa0f94..2de5126 100644 --- a/src/Components/UnionKeyword.php +++ b/src/Components/UnionKeyword.php @@ -26,8 +26,8 @@ class UnionKeyword extends Component public static function build($component, array $options = array()) { $tmp = array(); - foreach ($component as $component) { - $tmp[] = $component[0] . ' ' . $component[1]; + foreach ($component as $componentPart) { + $tmp[] = $componentPart[0] . ' ' . $componentPart[1]; } return implode(' ', $tmp); |