-
-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Visibility] Does not turn abstraction into static from implicit publ…
…ic abstractions in ExplicitPublicClassMethodRector (#7483) (#2930)
- Loading branch information
Showing
4 changed files
with
99 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,4 +60,4 @@ function notInScope() | |
{ | ||
} | ||
|
||
?> | ||
?> |
61 changes: 61 additions & 0 deletions
61
...ility/Rector/ClassMethod/ExplicitPublicClassMethodRector/Fixture/fixture_abstract.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,61 @@ | ||
<?php | ||
|
||
abstract class SomeAbstractClass | ||
{ | ||
abstract function noExplicitVis(); | ||
|
||
abstract public function publicVis(); | ||
|
||
abstract protected function protectedVis(); | ||
|
||
abstract private function privateVis(); | ||
|
||
static function noExplicitVisStatic() | ||
{ | ||
} | ||
|
||
public static function publicVisStatic() | ||
{ | ||
} | ||
|
||
protected static function protectedVisStatic() | ||
{ | ||
} | ||
|
||
private static function privateVisStatic() | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
abstract class SomeAbstractClass | ||
{ | ||
abstract public function noExplicitVis(); | ||
|
||
abstract public function publicVis(); | ||
|
||
abstract protected function protectedVis(); | ||
|
||
abstract private function privateVis(); | ||
|
||
public static function noExplicitVisStatic() | ||
{ | ||
} | ||
|
||
public static function publicVisStatic() | ||
{ | ||
} | ||
|
||
protected static function protectedVisStatic() | ||
{ | ||
} | ||
|
||
private static function privateVisStatic() | ||
{ | ||
} | ||
} | ||
|
||
?> |
21 changes: 21 additions & 0 deletions
21
...sibility/Rector/ClassMethod/ExplicitPublicClassMethodRector/Fixture/fixture_final.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,21 @@ | ||
<?php | ||
|
||
final class SomeFinalClass | ||
{ | ||
final function noExplicitVisFinal() | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
final class SomeFinalClass | ||
{ | ||
final public function noExplicitVisFinal() | ||
{ | ||
} | ||
} | ||
|
||
?> |
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