-
-
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.
[CodeQuality] Handle class-string case insensitive on CompleteDynamic…
…PropertiesRector (#3260)
- Loading branch information
1 parent
cb5b012
commit 79a34f9
Showing
3 changed files
with
68 additions
and
2 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
29 changes: 29 additions & 0 deletions
29
...ctor/Class_/CompleteDynamicPropertiesRector/Fixture/class_string_case_insensitive.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 | ||
|
||
/** No namespace on purpose to simplify demo that case insensitive string should not be marked as class-string */ | ||
class ClassStringCaseInsensitive | ||
{ | ||
public function set() | ||
{ | ||
$this->value = 'classStringCaseInSensitive'; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
/** No namespace on purpose to simplify demo that case insensitive string should not be marked as class-string */ | ||
class ClassStringCaseInsensitive | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
public $value; | ||
public function set() | ||
{ | ||
$this->value = 'classStringCaseInSensitive'; | ||
} | ||
} | ||
|
||
?> |
29 changes: 29 additions & 0 deletions
29
...Rector/Class_/CompleteDynamicPropertiesRector/Fixture/class_string_case_sensitive.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 | ||
|
||
/** No namespace on purpose to simplify demo that case sensitive string should be marked as class-string */ | ||
class ClassStringCaseSensitive | ||
{ | ||
public function set() | ||
{ | ||
$this->value = 'ClassStringCaseSensitive'; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
/** No namespace on purpose to simplify demo that case sensitive string should be marked as class-string */ | ||
class ClassStringCaseSensitive | ||
{ | ||
/** | ||
* @var class-string<\ClassStringCaseSensitive> | ||
*/ | ||
public $value; | ||
public function set() | ||
{ | ||
$this->value = 'ClassStringCaseSensitive'; | ||
} | ||
} | ||
|
||
?> |