Remove alternative executable files #627
Annotations
1 error and 12 warnings
Infection
Process completed with exit code 1.
|
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Get Composer cache directory
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Infection:
src/Utils/CLI.php#L28
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
public function __construct()
{
- Context::load();
+
}
public function run() : int
{
|
Infection:
src/Utils/CLI.php#L59
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
* @param string[]|false[] $params
* @param string[] $longopts
*/
- public function mergeLongOpts(array &$params, array &$longopts) : void
+ protected function mergeLongOpts(array &$params, array &$longopts) : void
{
foreach ($longopts as $value) {
$value = rtrim($value, ':');
|
Infection:
src/Utils/CLI.php#L71
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
$params[$value[0]] = $params[$value];
}
}
- public function usageHighlight() : void
+ protected function usageHighlight() : void
{
$command = 'sql-parser --highlight';
echo 'Usage: ' . $command . ' --query SQL [--format html|cli|text] [--ansi]' . "\n";
|
Infection:
src/Utils/CLI.php#L90
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
return getopt($opt, $long);
}
/** @return string[]|false[]|false */
- public function parseHighlight() : array|false
+ protected function parseHighlight() : array|false
{
$longopts = ['help', 'query:', 'format:', 'ansi'];
$params = $this->getopt('hq:f:a', $longopts);
|
Infection:
src/Utils/CLI.php#L92
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
/** @return string[]|false[]|false */
public function parseHighlight() : array|false
{
- $longopts = ['help', 'query:', 'format:', 'ansi'];
+ $longopts = ['query:', 'format:', 'ansi'];
$params = $this->getopt('hq:f:a', $longopts);
if ($params === false) {
return false;
|
Infection:
src/Utils/CLI.php#L158
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
$this->usageHighlight();
return 1;
}
- public function usageLint() : void
+ protected function usageLint() : void
{
$command = 'sql-parser --lint';
echo 'Usage: ' . $command . ' --query SQL [--ansi]' . "\n";
|
Infection:
src/Utils/CLI.php#L167
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
echo ' cat file.sql | ' . $command . "\n";
}
/** @return string[]|false[]|false */
- public function parseLint() : array|false
+ protected function parseLint() : array|false
{
$longopts = ['help', 'query:', 'context:', 'ansi'];
$params = $this->getopt('hq:c:a', $longopts);
|
Infection:
src/Utils/CLI.php#L169
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
/** @return string[]|false[]|false */
public function parseLint() : array|false
{
- $longopts = ['help', 'query:', 'context:', 'ansi'];
+ $longopts = ['query:', 'context:', 'ansi'];
$params = $this->getopt('hq:c:a', $longopts);
if ($params === false) {
return false;
|
Infection:
src/Utils/CLI.php#L199
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
return 0;
}
if (isset($params['c'])) {
- Context::load($params['c']);
+
}
if (!isset($params['q'])) {
$stdIn = $this->readStdin();
|
Infection:
src/Utils/CLI.php#L215
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
Context::setMode(Context::SQL_MODE_ANSI_QUOTES);
}
if (isset($params['q'])) {
- $lexer = new Lexer($params['q'], false);
+ $lexer = new Lexer($params['q'], true);
$parser = new Parser($lexer->list);
$errors = Error::get([$lexer, $parser]);
if ($errors === []) {
|
Loading