-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Add TypedPropertyFromStrictGetterMethodReturnTypeRe…
…ctor (#1048)
- Loading branch information
1 parent
341da79
commit fd5edff
Showing
67 changed files
with
539 additions
and
262 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
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
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
29 changes: 29 additions & 0 deletions
29
rules-tests/CodeQuality/Rector/If_/CombineIfRector/Fixture/skip_nested_type.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,29 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodeQuality\Rector\If_\CombineIfRector\Fixture; | ||
|
||
use PhpParser\Node\Expr\Assign; | ||
|
||
final class SkipNestedType | ||
{ | ||
public function run($expr) | ||
{ | ||
if ($this->isAssign($expr)) { | ||
/** @var Assign $expr */ | ||
if ($expr->var) { | ||
return true; | ||
} | ||
} | ||
|
||
return false; | ||
} | ||
|
||
private function isAssign($expr) | ||
{ | ||
if ($expr instanceof Assign) { | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...ion/Rector/ClassMethod/AddMethodCallBasedStrictParamTypeRector/Fixture/skip_alias.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,17 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector\Fixture; | ||
|
||
use PhpParser\Node as PhpParserNode; | ||
|
||
final class SkipAlias | ||
{ | ||
public function run(PhpParserNode $node) | ||
{ | ||
$this->getById($node); | ||
} | ||
|
||
private function getById(PhpParserNode $node) | ||
{ | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...tor/ClassMethod/AddMethodCallBasedStrictParamTypeRector/Fixture/skip_contract_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,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector\Fixture; | ||
|
||
use PhpParser\Node; | ||
use PhpParser\Node\Scalar\String_; | ||
use Rector\Core\Rector\AbstractRector; | ||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; | ||
|
||
final class SkipContractDoc extends AbstractRector | ||
{ | ||
public function getRuleDefinition(): RuleDefinition | ||
{ | ||
} | ||
|
||
public function getNodeTypes(): array | ||
{ | ||
} | ||
|
||
/** | ||
* @param String_ $node | ||
*/ | ||
public function refactor(Node $node) | ||
{ | ||
$this->processString($node); | ||
return null; | ||
} | ||
|
||
private function processString(String_ $string) | ||
{ | ||
} | ||
} |
41 changes: 0 additions & 41 deletions
41
.../AddMethodCallBasedStrictParamTypeRector/FixtureWeakDocBlock/unioned_double_calls.php.inc
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
...tion/Rector/ClassMethod/AddMethodCallBasedStrictParamTypeRector/config/weak_doc_block.php
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.