-
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Skip curly {@inheritdoc} on AddArrayReturnDocTypeRe…
…ctor (#2359)
- Loading branch information
1 parent
4c53b20
commit 9c6b3d7
Showing
4 changed files
with
57 additions
and
14 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
22 changes: 22 additions & 0 deletions
22
...ion/Rector/ClassMethod/AddArrayReturnDocTypeRector/Fixture/skip_curly_inherit_doc.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,22 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddArrayReturnDocTypeRector\Fixture; | ||
|
||
use Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddArrayReturnDocTypeRector\Source\ParentClassWithDefinedReturnSecond; | ||
|
||
class SkipCurlyInheritDoc extends ParentClassWithDefinedReturnSecond | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getData() | ||
{ | ||
return [ | ||
[ | ||
'a' => 'string', | ||
'b' => 1, | ||
'c' => 1.0 | ||
] | ||
]; | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
...tor/ClassMethod/AddArrayReturnDocTypeRector/Source/ParentClassWithDefinedReturnSecond.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,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddArrayReturnDocTypeRector\Source; | ||
|
||
abstract class ParentClassWithDefinedReturnSecond | ||
{ | ||
/** | ||
* @return mixed[] | ||
*/ | ||
public function getData() | ||
{ | ||
return ['...']; | ||
} | ||
} |