-
-
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.
- Loading branch information
1 parent
23e4b66
commit f0121f2
Showing
15 changed files
with
76 additions
and
101 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
37 changes: 0 additions & 37 deletions
37
...sts/DeadCode/Rector/Cast/RecastingRemovalRector/Fixture/non_typed_param_int_check.php.inc
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...ector/Cast/RecastingRemovalRector/Fixture/skip_method_call_return_docblock_string.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
2 changes: 1 addition & 1 deletion
2
rules-tests/DeadCode/Rector/Cast/RecastingRemovalRector/Fixture/skip_non_typed_param.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
2 changes: 1 addition & 1 deletion
2
...ode/Rector/Cast/RecastingRemovalRector/Fixture/skip_non_typed_param_numeric_check.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
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: 5 additions & 11 deletions
16
.../DeadCode/Rector/Cast/RecastingRemovalRector/Fixture/skip_non_typed_property.php2.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 |
---|---|---|
@@ -1,19 +1,13 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\Cast\RecastingRemovalRector\Rector; | ||
namespace Rector\Tests\DeadCode\Rector\Cast\RecastingRemovalRector\Fixture; | ||
|
||
class Config | ||
{ | ||
/** @var int */ | ||
public $property = 1; | ||
} | ||
use Rector\Tests\DeadCode\Rector\Cast\RecastingRemovalRector\Source\ExternalNonStrictTypedProperty; | ||
|
||
class SkipNonTypedProperty2 | ||
final class SkipNonTypedProperty2 | ||
{ | ||
public function run(Config $config) | ||
public function run(ExternalNonStrictTypedProperty $externalNonStrictTypedProperty) | ||
{ | ||
$value = (int) $config->property; | ||
$value = (int) $externalNonStrictTypedProperty->property; | ||
} | ||
} | ||
|
||
?> |
2 changes: 1 addition & 1 deletion
2
...tests/DeadCode/Rector/Cast/RecastingRemovalRector/Fixture/skip_with_set_get_magic.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
31 changes: 31 additions & 0 deletions
31
rules-tests/DeadCode/Rector/Cast/RecastingRemovalRector/Fixture/some_typed_property.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 Rector\Tests\DeadCode\Rector\Cast\RecastingRemovalRector\Fixture; | ||
|
||
use Rector\Tests\DeadCode\Rector\Cast\RecastingRemovalRector\Source\ExternalStrictTypedProperty; | ||
|
||
final class SomeTypedProperty | ||
{ | ||
public function run(ExternalStrictTypedProperty $externalStrictTypedProperty) | ||
{ | ||
$value = (int) $externalStrictTypedProperty->property; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\Cast\RecastingRemovalRector\Fixture; | ||
|
||
use Rector\Tests\DeadCode\Rector\Cast\RecastingRemovalRector\Source\ExternalStrictTypedProperty; | ||
|
||
final class SomeTypedProperty | ||
{ | ||
public function run(ExternalStrictTypedProperty $externalStrictTypedProperty) | ||
{ | ||
$value = $externalStrictTypedProperty->property; | ||
} | ||
} | ||
|
||
?> |
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
31 changes: 0 additions & 31 deletions
31
rules-tests/DeadCode/Rector/Cast/RecastingRemovalRector/Fixture/typed_property.php.inc
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
...sts/DeadCode/Rector/Cast/RecastingRemovalRector/Source/ExternalNonStrictTypedProperty.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,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\DeadCode\Rector\Cast\RecastingRemovalRector\Source; | ||
|
||
final class ExternalNonStrictTypedProperty | ||
{ | ||
/** @var int */ | ||
public $property = 1; | ||
} |
10 changes: 10 additions & 0 deletions
10
...-tests/DeadCode/Rector/Cast/RecastingRemovalRector/Source/ExternalStrictTypedProperty.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\DeadCode\Rector\Cast\RecastingRemovalRector\Source; | ||
|
||
final class ExternalStrictTypedProperty | ||
{ | ||
public int $property = 1; | ||
} |