-
-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoImport] Allow auto import same namespace with sub use with docbl…
…ock short name (#5763) * [AutoImport] Allow auto import same namespace with sub use with docblock short name * more fixtures * Fix non-docblock name * [ci-review] Rector Rectify * docblock is require FullyQualifiedObject due to generic * fix * fix comment * fix --------- Co-authored-by: GitHub Action <actions@github.com>
- Loading branch information
1 parent
c45f0e2
commit e3e741e
Showing
6 changed files
with
72 additions
and
24 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
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
26 changes: 26 additions & 0 deletions
26
tests/Issues/AutoImport/Fixture/DocBlock/union_equal_last_name_class_exists.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,26 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
/** | ||
* @param \stdClass|\Rector\Tests\Issues\AutoImport\Source\stdClass $param | ||
*/ | ||
function unionEqualLastNameClassExists($param) | ||
{ | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace App; | ||
|
||
use stdClass; | ||
/** | ||
* @param stdClass|\Rector\Tests\Issues\AutoImport\Source\stdClass $param | ||
*/ | ||
function unionEqualLastNameClassExists($param) | ||
{ | ||
} | ||
|
||
?> |
31 changes: 31 additions & 0 deletions
31
tests/Issues/AutoImport/Fixture/same_namespace_with_sub_use.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,31 @@ | ||
<?php | ||
|
||
namespace App\Database; | ||
|
||
use Config\Database; | ||
|
||
/** | ||
* @param Forge $forge | ||
*/ | ||
function same_namespace_with_sub_use(\App\Database\Forge $forge) | ||
{ | ||
|
||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace App\Database; | ||
|
||
use Config\Database; | ||
|
||
/** | ||
* @param Forge $forge | ||
*/ | ||
function same_namespace_with_sub_use(Forge $forge) | ||
{ | ||
|
||
} | ||
|
||
?> |
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,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\Issues\AutoImport\Source; | ||
|
||
class stdClass | ||
{ | ||
} |