8000 134 - Strict types for arguments and return types by lutdev · Pull Request #135 · matomo-org/matomo-php-tracker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

134 - Strict types for arguments and return types #135

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

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

lutdev
Copy link
Contributor
@lutdev lutdev commented May 29, 2024

I made the code more strict

Issue - #134

@lutdev
Copy link
Contributor Author
lutdev commented Jun 11, 2024

@sgiehl just a friendly reminder about PR :)

Copy link
Member
@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

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

Hey @lutdev. Sorry for the delay. Had a lot other stuff to handle. The changes overall already look fine to me. I nevertheless added a comment we could consider to change. It might though not be needed for this PR. If you want we can also merge this and change the return values in a new PR.

@@ -237,7 +237,7 @@ public function __construct($idSite, $apiUrl = '')
$this->visitorCustomVar = $this->getCustomVariablesFromCookie();
}

public function setApiUrl(string $url)
public function setApiUrl(string $url): void
Copy link
Member

Choose a reason for hiding this comment

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

should we maybe change all set* methods to return $this. It currently feels a bit inconsistent that most methods are already doing that, but only some don't. We could maybe even change all other methods that are not supposed to return a specific value to return $this as well, so all methods can be easily chained.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sgiehl I agree with you and it was in mind but for the next PR) So, if it's okay for you after merge I will create new issue and describe upcoming changes.

@sgiehl sgiehl merged commit 4fb8529 into matomo-org:master Jun 18, 2024
11 checks passed
@lutdev lutdev deleted the 134-strict-types branch June 18, 2024 16:15
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.

2 participants
0