File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed
rules-tests/CodeQuality/Rector/MethodCall/ScalarArgumentToExpectedParamTypeRector Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Rector \PHPUnit \Tests \CodeQuality \Rector \MethodCall \ScalarArgumentToExpectedParamTypeRector \Fixture ;
4+
5+ use PHPUnit \Framework \TestCase ;
6+ use Rector \PHPUnit \Tests \CodeQuality \Rector \MethodCall \ScalarArgumentToExpectedParamTypeRector \Source \SomeClassWithSetter ;
7+
8+ final class SkipDocblockType extends TestCase
9+ {
10+ public function test ()
11+ {
12+ $ someClassWithSetter = new SomeClassWithSetter ();
13+ $ someClassWithSetter ->setMagicType (123456 );
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Rector \PHPUnit \Tests \CodeQuality \Rector \MethodCall \ScalarArgumentToExpectedParamTypeRector \Fixture ;
4+
5+ use PHPUnit \Framework \TestCase ;
6+ use Rector \PHPUnit \Tests \CodeQuality \Rector \MethodCall \ScalarArgumentToExpectedParamTypeRector \Source \SomeClassWithSetter ;
7+
8+ final class SkipUnionType extends TestCase
9+ {
10+ public function test ()
11+ {
12+ $ someClassWithSetter = new SomeClassWithSetter ();
13+ $ someClassWithSetter ->setUnionType (123456 );
14+ }
15+ }
Original file line number Diff line number Diff line change @@ -9,4 +9,17 @@ final class SomeClassWithSetter
99 public function setPhoneNumber (string $ phoneNumber )
1010 {
1111 }
12+
13+ /**
14+ * @param string $passportId
15+ */
16+ public function setMagicType ($ passportId )
17+ {
18+
19+ }
20+
21+ public function setUnionType (int |string $ unionValue )
22+ {
23+
24+ }
1225}
You can’t perform that action at this time.
0 commit comments