Skip to content

Commit f80c697

Browse files
committed
Fix some coding standard issues
Signed-off-by: Maurício Meneghini Fauth <[email protected]>
1 parent ffd1470 commit f80c697

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

src/Utils/Formatter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
use function htmlspecialchars;
1818
use function in_array;
1919
use function mb_strlen;
20-
use function php_sapi_name;
2120
use function str_repeat;
2221
use function str_replace;
2322
use function strpos;
2423
use function strtoupper;
2524
use const ENT_NOQUOTES;
25+
use const PHP_SAPI;
2626

2727
/**
2828
* Utilities that are used for formatting queries.
@@ -132,7 +132,7 @@ protected function getDefaultOptions()
132132
*
133133
* @var string The type ('text', 'cli' or 'html')
134134
*/
135-
'type' => php_sapi_name() === 'cli' ? 'cli' : 'text',
135+
'type' => PHP_SAPI === 'cli' ? 'cli' : 'text',
136136

137137
/*
138138
* The line ending used.

src/Utils/Query.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,9 +749,7 @@ public static function replaceClauses($statement, $list, array $ops)
749749
}
750750

751751
// Adding everything after the last replacement.
752-
$ret .= static::getClause($statement, $list, $ops[$count - 1][0], 1);
753-
754-
return $ret;
752+
return $ret . static::getClause($statement, $list, $ops[$count - 1][0], 1);
755753
}
756754

757755
/**

tests/Builder/CallStatementTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace PhpMyAdmin\SqlParser\Tests\Builder;
46

57
use PhpMyAdmin\SqlParser\Parser;

tests/Builder/TruncateStatementTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace PhpMyAdmin\SqlParser\Tests\Builder;
46

57
use PhpMyAdmin\SqlParser\Parser;

tests/Parser/DropStatementTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace PhpMyAdmin\SqlParser\Tests\Parser;
46

57
use PhpMyAdmin\SqlParser\Tests\TestCase;

0 commit comments

Comments
 (0)