-
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PHP 8.0] Skip union types docs to code with soft vendor lock (#781)
* add test case to skip contracts * [PHP 8.0] Skip union types docs to code with soft vendor lock
- Loading branch information
1 parent
d8b3be9
commit 130b634
Showing
7 changed files
with
138 additions
and
25 deletions.
There are no files selected for viewing
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
15 changes: 15 additions & 0 deletions
15
rules-tests/Php80/Rector/FunctionLike/UnionTypesRector/Fixture/skip_parent_contract.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\FunctionLike\UnionTypesRector\Fixture; | ||
|
||
use Rector\Tests\Php80\Rector\FunctionLike\UnionTypesRector\Source\SomeContract; | ||
|
||
final class SkipParentContract implements SomeContract | ||
{ | ||
/** | ||
* @param int|string $param | ||
*/ | ||
public function run($param) | ||
{ | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...sts/Php80/Rector/FunctionLike/UnionTypesRector/Fixture/skip_parent_contract_class.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\FunctionLike\UnionTypesRector\Fixture; | ||
|
||
use Rector\Tests\Php80\Rector\FunctionLike\UnionTypesRector\Source\SomeContractClass; | ||
|
||
final class SkipParentContractClass extends SomeContractClass | ||
{ | ||
/** | ||
* @param int|string $param | ||
*/ | ||
public function run($param) | ||
{ | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
rules-tests/Php80/Rector/FunctionLike/UnionTypesRector/Source/SomeContract.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,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\Php80\Rector\FunctionLike\UnionTypesRector\Source; | ||
|
||
interface SomeContract | ||
{ | ||
public function run($param); | ||
} |
12 changes: 12 additions & 0 deletions
12
rules-tests/Php80/Rector/FunctionLike/UnionTypesRector/Source/SomeContractClass.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\Php80\Rector\FunctionLike\UnionTypesRector\Source; | ||
|
||
abstract class SomeContractClass | ||
{ | ||
public function run($param) | ||
{ | ||
} | ||
} |
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
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