*/ public function providerValidCodeParse(): array { return [ 'removePossiblyUnusedMethod' => [ 'input' => 'foo();', 'output' => 'foo();', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedMethod'], 'safe_types' => true, ], 'removePossiblyUnusedMethodInMiddle' => [ 'input' => 'foo(); (new A)->bat();', 'output' => 'foo(); (new A)->bat();', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedMethod'], 'safe_types' => true, ], 'removeAllPossiblyUnusedMethods' => [ 'input' => ' ' '7.1', 'issues_to_fix' => ['PossiblyUnusedMethod'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedMethodWithMixedUse' => [ 'input' => 'foo(); }', 'output' => 'foo(); }', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedMethod'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedMethodWithSuppression' => [ 'input' => 'foo();', 'output' => 'foo();', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedMethod'], 'safe_types' => true, ], 'removeUnusedMethod' => [ 'input' => 'foo();', 'output' => 'foo();', 'php_version' => '7.1', 'issues_to_fix' => ['UnusedMethod'], 'safe_types' => true, ], 'removeUnusedMethodAtBeginning' => [ 'input' => 'bar();', 'output' => 'bar();', 'php_version' => '7.1', 'issues_to_fix' => ['UnusedMethod'], 'safe_types' => true, ], 'removePossiblyUnusedMethodWithDocblock' => [ 'input' => 'foo();', 'output' => 'foo();', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedMethod'], 'safe_types' => true, ], 'removeUnusedMethodWithDocblock' => [ 'input' => 'foo();', 'output' => 'foo();', 'php_version' => '7.1', 'issues_to_fix' => ['UnusedMethod'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedMethodWithVariableCall' => [ 'input' => '$var(); }', 'output' => '$var(); }', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedMethod'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedMethodWithVariableCallableCall' => [ 'input' => ' ' '7.1', 'issues_to_fix' => ['PossiblyUnusedMethod'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedMethodWithCallUserFuncCall' => [ 'input' => ' ' '7.1', 'issues_to_fix' => ['PossiblyUnusedMethod'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedMethodWithVariableCallableLhsCall' => [ 'input' => ' ' '7.1', 'issues_to_fix' => ['PossiblyUnusedMethod'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedMethodWithVariableCallOnParent' => [ 'input' => '$var(); } foo(new B);', 'output' => '$var(); } foo(new B);', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedMethod'], 'safe_types' => true, ], 'removePossiblyUnusedMethodWithVariableCall' => [ 'input' => '$var(); }', 'output' => '$var(); }', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedMethod'], 'safe_types' => true, ], 'removePossiblyUnusedMethodAndMissingReturnType' => [ 'input' => ' ' '7.1', 'issues_to_fix' => ['PossiblyUnusedMethod', 'MissingReturnType'], 'safe_types' => true, ], 'removePossiblyUnusedPropertyWithDocblock' => [ 'input' => 'foo;', 'output' => 'foo;', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedProperty'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedPropertyWithMixedUse' => [ 'input' => 'foo; }', 'output' => 'foo; }', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedProperty'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedPropertyWithSuppression' => [ 'input' => ' ' '7.1', 'issues_to_fix' => ['PossiblyUnusedProperty'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedPropertyWithVariableFetch' => [ 'input' => '$var; }', 'output' => '$var; }', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedProperty'], 'safe_types' => true, ], 'removePossiblyUnusedPropertyWithVariableFetch' => [ 'input' => '$var; }', 'output' => '$var; }', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedProperty'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedPropertyWithVariableFetchInParent' => [ 'input' => '$k = $v; } } class B extends A { public $foo = "hello"; } (new B())->__set("foo", "bar");', 'output' => '$k = $v; } } class B extends A { public $foo = "hello"; } (new B())->__set("foo", "bar");', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedProperty'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedPropertyWithVariableOnParent' => [ 'input' => '$var; } foo(new A(), "foo");', 'output' => '$var; } foo(new A(), "foo");', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedProperty'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedPropertyWithVariableFetchImplementedInterface' => [ 'input' => '$var; } foo(new A(), "foo");', 'output' => '$var; } foo(new A(), "foo");', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedProperty'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedPropertyWithStaticVariableFetch' => [ 'input' => ' ' '7.1', 'issues_to_fix' => ['PossiblyUnusedProperty'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedPropertyWithVariableAssignment' => [ 'input' => '$var = "hello"; }', 'output' => '$var = "hello"; }', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedProperty'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedPropertyWithVariableAssignmentOnParent' => [ 'input' => '$var = "hello"; } foo(new B);', 'output' => '$var = "hello"; } foo(new B);', 'php_version' => '7.1', 'issues_to_fix' => ['PossiblyUnusedProperty'], 'safe_types' => true, ], 'dontRemovePossiblyUnusedPropertyWithStaticVariableAssignment' => [ 'input' => ' ' '7.1', 'issues_to_fix' => ['PossiblyUnusedProperty'], 'safe_types' => true, ], 'removeUnusedPropertyWithDocblock' => [ 'input' => 'foo;', 'output' => 'foo;', 'php_version' => '7.1', 'issues_to_fix' => ['UnusedProperty'], 'safe_types' => true, ], ]; } }