-
Notifications
You must be signed in to change notification settings - Fork 928
[PHP] Return type changed in PHP >= 8-0. Fluent setters now return static.
#9431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
DamImpr
wants to merge
1
commit into
apache:master
Choose a base branch
from
DamImpr:fluent_setter_static_from_php_80
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
72 changes: 72 additions & 0 deletions
72
...pedPropertiesSetter/testTypedPropertiesSetter.php.testTypedPropertiesSetter_PHP80.codegen
This file contains hidden or 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,72 @@ | ||
| public function setInstanceArray(array $$instanceArray): void { | ||
| $$this->instanceArray = $instanceArray; | ||
| } | ||
|
|
||
| public function setInstanceInt(int $$instanceInt): void { | ||
| $$this->instanceInt = $instanceInt; | ||
| } | ||
|
|
||
| public function setInstanceString(string $$instanceString): void { | ||
| $$this->instanceString = $instanceString; | ||
| } | ||
|
|
||
| public function setInstanceBool(bool $$instanceBool): void { | ||
| $$this->instanceBool = $instanceBool; | ||
| } | ||
|
|
||
| public function setInstanceNull($$instanceNull): void { | ||
| $$this->instanceNull = $instanceNull; | ||
| } | ||
|
|
||
| public function setInstanceNullable(?string $$instanceNullable): void { | ||
| $$this->instanceNullable = $instanceNullable; | ||
| } | ||
|
|
||
| public function setInstanceArrayNullable(?array $$instanceArrayNullable): void { | ||
| $$this->instanceArrayNullable = $instanceArrayNullable; | ||
| } | ||
|
|
||
| public function setInstanceClass(Test53 $$instanceClass): void { | ||
| $$this->instanceClass = $instanceClass; | ||
| } | ||
|
|
||
| public static function setStaticInt(int $$staticInt): void { | ||
| self::$$staticInt = $staticInt; | ||
| } | ||
|
|
||
| public static function setStaticNullable(?int $$staticNullable): void { | ||
| self::$$staticNullable = $staticNullable; | ||
| } | ||
|
|
||
| public function setInstanceInt74(int $$instanceInt74): void { | ||
| $$this->instanceInt74 = $instanceInt74; | ||
| } | ||
|
|
||
| public function setInstanceString74(string $$instanceString74): void { | ||
| $$this->instanceString74 = $instanceString74; | ||
| } | ||
|
|
||
| public function setInstanceBool74(bool $$instanceBool74): void { | ||
| $$this->instanceBool74 = $instanceBool74; | ||
| } | ||
|
|
||
| public function setInstanceNullable74(?string $$instanceNullable74): void { | ||
| $$this->instanceNullable74 = $instanceNullable74; | ||
| } | ||
|
|
||
| public static function setStaticInt74(int $$staticInt74): void { | ||
| self::$$staticInt74 = $staticInt74; | ||
| } | ||
|
|
||
| public static function setStaticString74(string $$staticString74): void { | ||
| self::$$staticString74 = $staticString74; | ||
| } | ||
|
|
||
| public static function setStaticBool74(bool $$staticBool74): void { | ||
| self::$$staticBool74 = $staticBool74; | ||
| } | ||
|
|
||
| public static function setStaticNullable74(?string $$staticNullable74): void { | ||
| self::$$staticNullable74 = $staticNullable74; | ||
| } | ||
|
|
90 changes: 90 additions & 0 deletions
90
...pertiesSetter/testTypedPropertiesSetter.php.testTypedPropertiesSetter_PHP80Fluent.codegen
This file contains hidden or 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,90 @@ | ||
| public function setInstanceArray(array $$instanceArray): static { | ||
| $$this->instanceArray = $instanceArray; | ||
| return $$this; | ||
| } | ||
|
|
||
| public function setInstanceInt(int $$instanceInt): static { | ||
| $$this->instanceInt = $instanceInt; | ||
| return $$this; | ||
| } | ||
|
|
||
| public function setInstanceString(string $$instanceString): static { | ||
| $$this->instanceString = $instanceString; | ||
| return $$this; | ||
| } | ||
|
|
||
| public function setInstanceBool(bool $$instanceBool): static { | ||
| $$this->instanceBool = $instanceBool; | ||
| return $$this; | ||
| } | ||
|
|
||
| public function setInstanceNull($$instanceNull): static { | ||
| $$this->instanceNull = $instanceNull; | ||
| return $$this; | ||
| } | ||
|
|
||
| public function setInstanceNullable(?string $$instanceNullable): static { | ||
| $$this->instanceNullable = $instanceNullable; | ||
| return $$this; | ||
| } | ||
|
|
||
| public function setInstanceArrayNullable(?array $$instanceArrayNullable): static { | ||
| $$this->instanceArrayNullable = $instanceArrayNullable; | ||
| return $$this; | ||
| } | ||
|
|
||
| public function setInstanceClass(Test53 $$instanceClass): static { | ||
| $$this->instanceClass = $instanceClass; | ||
| return $$this; | ||
| } | ||
|
|
||
| public static function setStaticInt(int $$staticInt): static { | ||
| self::$$staticInt = $staticInt; | ||
| return self; | ||
| } | ||
|
|
||
| public static function setStaticNullable(?int $$staticNullable): static { | ||
| self::$$staticNullable = $staticNullable; | ||
| return self; | ||
| } | ||
|
|
||
| public function setInstanceInt74(int $$instanceInt74): static { | ||
| $$this->instanceInt74 = $instanceInt74; | ||
| return $$this; | ||
| } | ||
|
|
||
| public function setInstanceString74(string $$instanceString74): static { | ||
| $$this->instanceString74 = $instanceString74; | ||
| return $$this; | ||
| } | ||
|
|
||
| public function setInstanceBool74(bool $$instanceBool74): static { | ||
| $$this->instanceBool74 = $instanceBool74; | ||
| return $$this; | ||
| } | ||
|
|
||
| public function setInstanceNullable74(?string $$instanceNullable74): static { | ||
| $$this->instanceNullable74 = $instanceNullable74; | ||
| return $$this; | ||
| } | ||
|
|
||
| public static function setStaticInt74(int $$staticInt74): static { | ||
| self::$$staticInt74 = $staticInt74; | ||
| return self; | ||
| } | ||
|
|
||
| public static function setStaticString74(string $$staticString74): static { | ||
| self::$$staticString74 = $staticString74; | ||
| return self; | ||
| } | ||
|
|
||
| public static function setStaticBool74(bool $$staticBool74): static { | ||
| self::$$staticBool74 = $staticBool74; | ||
| return self; | ||
| } | ||
|
|
||
| public static function setStaticNullable74(?string $$staticNullable74): static { | ||
| self::$$staticNullable74 = $staticNullable74; | ||
| return self; | ||
| } | ||
|
|
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.