File tree Expand file tree Collapse file tree
rules-tests/Php83/Rector/BooleanAnd/JsonValidate
rules/Php83/Rector/BooleanAnd Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33declare (strict_types=1 );
44
55use Rector \Config \RectorConfig ;
6+ use Rector \Php83 \Rector \BooleanAnd \JsonValidateRector ;
67use Rector \Php83 \Rector \Class_ \ReadOnlyAnonymousClassRector ;
78use Rector \Php83 \Rector \ClassConst \AddTypeToConstRector ;
89use Rector \Php83 \Rector \ClassMethod \AddOverrideAttributeToOverriddenMethodsRector ;
1819 RemoveGetClassGetParentClassNoArgsRector::class,
1920 ReadOnlyAnonymousClassRector::class,
2021 DynamicClassConstFetchRector::class,
22+ JsonValidateRector::class
2123 ]);
2224};
Original file line number Diff line number Diff line change 11<?php
2- namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidate \Fixture ;
2+ namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidateRector \Fixture ;
33
44if (json_decode ($ json , true ) !== null && json_last_error () === JSON_ERROR_NONE ){
55 echo 1 ;
66}
77?>
88-----
99<?php
10- namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidate \Fixture ;
10+ namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidateRector \Fixture ;
1111
1212if (json_validate ($ json )){
1313 echo 1 ;
Original file line number Diff line number Diff line change 11<?php
2- namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidate \Fixture ;
2+ namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidateRector \Fixture ;
33
44if (json_decode ($ json , true ) !== null && json_last_error () === JSON_ERROR_NONE ){
55 echo 1 ;
66}
77?>
88-----
99<?php
10- namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidate \Fixture ;
10+ namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidateRector \Fixture ;
1111
1212if (json_validate ($ json )){
1313 echo 1 ;
Original file line number Diff line number Diff line change 11<?php
2- namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidate \Fixture ;
2+ namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidateRector \Fixture ;
33
44if ($ flag ) {
55 echo "skip " ;
@@ -8,7 +8,7 @@ if ($flag) {
88}
99-----
1010<?php
11- namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidate \Fixture ;
11+ namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidateRector \Fixture ;
1212
1313if ($ flag ) {
1414 echo "skip " ;
Original file line number Diff line number Diff line change 11<?php
2- namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidate \Fixture ;
2+ namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidateRector \Fixture ;
33
44if (json_decode ('{"a":1} ' , true ) !== null && json_last_error () === JSON_ERROR_NONE ) {
55 echo "inline " ;
66}
77-----
88<?php
9- namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidate \Fixture ;
9+ namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidateRector \Fixture ;
1010
1111if (json_validate ('{"a":1} ' )) {
1212 echo "inline " ;
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidate ;
5+ namespace Rector \Tests \Php83 \Rector \BooleanAnd \JsonValidateRector ;
66
77use Iterator ;
88use PHPUnit \Framework \Attributes \DataProvider ;
99use Rector \Testing \PHPUnit \AbstractRectorTestCase ;
1010
11- final class JsonValidateTest extends AbstractRectorTestCase
11+ final class JsonValidateRectorTest extends AbstractRectorTestCase
1212{
1313 #[DataProvider('provideData ' )]
1414 public function test (string $ filePath ): void
Original file line number Diff line number Diff line change 33declare (strict_types=1 );
44
55use Rector \Config \RectorConfig ;
6- use Rector \Php83 \Rector \BooleanAnd \JsonValidate ;
6+ use Rector \Php83 \Rector \BooleanAnd \JsonValidateRector ;
77use Rector \ValueObject \PhpVersion ;
88
99return static function (RectorConfig $ rectorConfig ): void {
1010 $ rectorConfig ->phpVersion (PhpVersion::PHP_80 );
1111
12- $ rectorConfig ->rule (JsonValidate ::class);
12+ $ rectorConfig ->rule (JsonValidateRector ::class);
1313};
Original file line number Diff line number Diff line change 2222/**
2323 * @see \Rector\Tests\Php80\Rector\BooleanAnd\JsonValidate\JsonValidateTest
2424 */
25- final class JsonValidate extends AbstractRector implements MinPhpVersionInterface, RelatedPolyfillInterface
25+ final class JsonValidateRector extends AbstractRector implements MinPhpVersionInterface, RelatedPolyfillInterface
2626{
27- public function __construct ()
28- {
29- }
3027
3128 public function provideMinPhpVersion (): int
3229 {
You can’t perform that action at this time.
0 commit comments