-
-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ArgumentRemoverRectorTest: replace symfony\yaml reference with dummy (#…
…5799) * ArgumentRemoverRectorTest: replace symfony\yaml reference with dummy * Keep PARSE_KEYS_AS_STRINGS reference
- Loading branch information
Showing
3 changed files
with
34 additions
and
21 deletions.
There are no files selected for viewing
38 changes: 19 additions & 19 deletions
38
rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/Fixture/fixture2.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
<?php | ||
|
||
use Symfony\Component\Yaml\Yaml; | ||
use Rector\Tests\Removing\Rector\ClassMethod\ArgumentRemoverRector\Source\Yaml; | ||
|
||
function argumentRemover() | ||
{ | ||
$yaml = []; | ||
|
||
Symfony\Component\Yaml\Yaml::parse($yaml, Symfony\Component\Yaml\Yaml::PARSE_KEYS_AS_STRINGS); | ||
Yaml::parse($yaml, Symfony\Component\Yaml\Yaml::PARSE_KEYS_AS_STRINGS); | ||
|
||
Symfony\Component\Yaml\Yaml::parse($yaml, Yaml::PARSE_KEYS_AS_STRINGS); | ||
Yaml::parse($yaml, Symfony\Component\Yaml\Yaml::PARSE_KEYS_AS_STRINGS); | ||
|
||
Symfony\Component\Yaml\Yaml::parse($yaml, Symfony\Component\Yaml\Yaml::PARSE_CONSTANT); | ||
Yaml::parse($yaml, Yaml::KEPT_CONSTANT); | ||
|
||
Yaml::parse($yaml, Yaml::PARSE_KEYS_AS_STRINGS); | ||
Yaml::parse($yaml, Symfony\Component\Yaml\Yaml::PARSE_KEYS_AS_STRINGS); | ||
|
||
Symfony\Component\Yaml\Yaml::parse($yaml, 55); | ||
Symfony\Component\Yaml\Yaml::parse($yaml, 56); | ||
Symfony\Component\Yaml\Yaml::parse($yaml, 'hey'); | ||
Symfony\Component\Yaml\Yaml::parse($yaml, 'hi'); | ||
Symfony\Component\Yaml\Yaml::parse($yaml, 5.5); | ||
Yaml::parse($yaml, 55); | ||
Yaml::parse($yaml, 56); | ||
Yaml::parse($yaml, 'hey'); | ||
Yaml::parse($yaml, 'hi'); | ||
Yaml::parse($yaml, 5.5); | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
use Symfony\Component\Yaml\Yaml; | ||
use Rector\Tests\Removing\Rector\ClassMethod\ArgumentRemoverRector\Source\Yaml; | ||
|
||
function argumentRemover() | ||
{ | ||
$yaml = []; | ||
|
||
Symfony\Component\Yaml\Yaml::parse($yaml); | ||
Yaml::parse($yaml); | ||
|
||
Symfony\Component\Yaml\Yaml::parse($yaml); | ||
Yaml::parse($yaml); | ||
|
||
Symfony\Component\Yaml\Yaml::parse($yaml, Symfony\Component\Yaml\Yaml::PARSE_CONSTANT); | ||
Yaml::parse($yaml, Yaml::KEPT_CONSTANT); | ||
|
||
Yaml::parse($yaml); | ||
|
||
Symfony\Component\Yaml\Yaml::parse($yaml); | ||
Symfony\Component\Yaml\Yaml::parse($yaml, 56); | ||
Symfony\Component\Yaml\Yaml::parse($yaml); | ||
Symfony\Component\Yaml\Yaml::parse($yaml, 'hi'); | ||
Symfony\Component\Yaml\Yaml::parse($yaml); | ||
Yaml::parse($yaml); | ||
Yaml::parse($yaml, 56); | ||
Yaml::parse($yaml); | ||
Yaml::parse($yaml, 'hi'); | ||
Yaml::parse($yaml); | ||
} | ||
|
||
?> |
12 changes: 12 additions & 0 deletions
12
rules-tests/Removing/Rector/ClassMethod/ArgumentRemoverRector/Source/Yaml.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\Removing\Rector\ClassMethod\ArgumentRemoverRector\Source; | ||
|
||
class Yaml | ||
{ | ||
public const KEPT_CONSTANT = 2; | ||
|
||
public static function parse($input, $flags) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters