Skip to content
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

Strongly typed endpoint output #106

Merged
merged 2 commits into from
Jul 10, 2024
Merged

Conversation

seba-aln
Copy link
Contributor

@seba-aln seba-aln commented Jul 2, 2024

refactor: Added strict typing for some customer facing elements

@seba-aln seba-aln force-pushed the refactor/typing-for-common-stuff branch from 0110fd7 to ecdf8e5 Compare July 2, 2024 20:44
@seba-aln seba-aln changed the title Typing WIP Strongly typed endpoint output Jul 3, 2024
@seba-aln seba-aln marked this pull request as ready for review July 3, 2024 08:23
@@ -88,7 +87,7 @@ protected function httpMethod()
/**
* @return PNAccessManagerAuditResult

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment need when a type is defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll include it in future PR

{
return PNGetChannelMetadataResult::fromPayload($result);
}

public function sync(): PNGetChannelMetadataResult
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In src/PubNub/Endpoints/Objects/Channel/GetAllChannelMetadata.php there is different formatting. Sth like this:

public function sync(): PNGetChannelMetadataResult {
 return parent::sync();
}

Shouldn't it be consistent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed. the correct way is the opening bracket for a class or function in newline, for conditionals in same line after a single space.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you commit this fix? I can see only one commit - initial one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@seba-aln
Copy link
Contributor Author

@pubnub-release-bot release

@seba-aln seba-aln merged commit 392d5a3 into master Jul 10, 2024
6 checks passed
@seba-aln seba-aln deleted the refactor/typing-for-common-stuff branch July 10, 2024 12:46
@pubnub-release-bot
Copy link
Contributor

🚀 Release successfully completed 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants