Refactoring formatter #646
+171
−673
Open
Annotations
1 error and 10 warnings
|
Infection
Process completed with exit code 1.
|
|
Infection:
src/Utils/CLI.php#L217
Escaped Mutant for Mutator "FalseValue":
@@ @@
}
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 === []) {
|
|
Infection:
src/Utils/CLI.php#L201
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
}
if (isset($params['c'])) {
- Context::load($params['c']);
+
}
if (! isset($params['q'])) {
|
|
Infection:
src/Utils/CLI.php#L171
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
public function parseLint(): array|false
{
$longopts = [
- 'help',
'query:',
'context:',
'ansi',
|
|
Infection:
src/Utils/CLI.php#L169
Escaped Mutant for Mutator "PublicVisibility":
@@ @@
}
/** @return string[]|false[]|false */
- public function parseLint(): array|false
+ protected function parseLint(): array|false
{
$longopts = [
'help',
|
|
Infection:
src/Utils/CLI.php#L160
Escaped Mutant for Mutator "PublicVisibility":
@@ @@
return 1;
}
- public function usageLint(): void
+ protected function usageLint(): void
{
$command = 'sql-parser --lint';
|
|
Infection:
src/Utils/CLI.php#L92
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
public function parseHighlight(): array|false
{
$longopts = [
- 'help',
'query:',
'format:',
'ansi',
|
|
Infection:
src/Utils/CLI.php#L90
Escaped Mutant for Mutator "PublicVisibility":
@@ @@
}
/** @return string[]|false[]|false */
- public function parseHighlight(): array|false
+ protected function parseHighlight(): array|false
{
$longopts = [
'help',
|
|
Infection:
src/Utils/CLI.php#L71
Escaped Mutant for Mutator "PublicVisibility":
@@ @@
}
}
- public function usageHighlight(): void
+ protected function usageHighlight(): void
{
$command = 'sql-parser --highlight';
|
|
Infection:
src/Utils/CLI.php#L59
Escaped Mutant for Mutator "PublicVisibility":
@@ @@
* @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#L28
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
{
public function __construct()
{
- Context::load();
+
}
public function run(): int
|
Loading