Skip to content

Conversation

michaljurecko
Copy link

@michaljurecko michaljurecko commented Dec 11, 2020

@@ -102,7 +102,8 @@ class SqlFormatter
);

// Punctuation that can be used as a boundary between other tokens
protected static $boundaries = array(',', ';',':', ')', '(', '.', '=', '<', '>', '+', '-', '*', '/', '!', '^', '%', '|', '&', '#');
const DEFAULT_BOUNDARIES = array(',', ';',':', ')', '(', '.', '=', '<', '>', '+', '-', '*', '/', '!', '^', '%', '|', '&', '#');
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v PHP 5.6 nemoze byt public const.

public static function setBoundaries(array $boundaries)
{
self::$boundaries = $boundaries;
self::$regex_boundaries = '('.implode('|',array_map(array(__CLASS__, 'quote_regex'),self::$boundaries)).')';
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pri zmene tychto vyhradenych znakov, je potrebne upravit aj regexp.

@@ -122,7 +123,7 @@ public function testSynapseTempTables() {
$sqlWithComment = "-- This is comment\n" . $sql;
$expected = <<<SQL
SELECT
* INTO # temp_table
* INTO #temp_table
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prehliadol som, ze mi to tu pridava medzeru, co je nespravne.

@michaljurecko michaljurecko marked this pull request as ready for review December 11, 2020 13:48
@michaljurecko
Copy link
Author

@ondrajodas mozes prosim pozriet este tento fix, nevsimol som si to

@ondrajodas
Copy link

@webrouse jj jdu na to

@michaljurecko michaljurecko merged commit 03c7561 into master Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants