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

Refactor lib/private/Remote #39163

Closed

Conversation

shdehnavi
Copy link
Contributor

@shdehnavi shdehnavi commented Jul 5, 2023

Summary

The required adjustments have been made to the classes in /lib/private/Remote namespace.

The improvements:

  • Using PHP8's constructor property promotion
  • Adding return types
  • Adding throws types
  • Adding types to properties
  • Using PHP8's match expression instead of switch

Checklist

Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
@shdehnavi shdehnavi changed the title Refactor lib private remote Refactor lib/private/remote Jul 5, 2023
@shdehnavi shdehnavi changed the title Refactor lib/private/remote Refactor lib/private/Remote Jul 5, 2023
@solracsf solracsf added 3. to review Waiting for reviews technical debt labels Jul 6, 2023
@solracsf solracsf added this to the Nextcloud 28 milestone Jul 6, 2023
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Co-authored-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Co-authored-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
lib/private/Remote/Instance.php Fixed Show fixed Hide fixed
lib/private/Remote/User.php Fixed Show fixed Hide fixed
lib/private/Remote/User.php Fixed Show fixed Hide fixed
lib/private/Remote/User.php Fixed Show fixed Hide fixed
lib/private/Remote/User.php Fixed Show fixed Hide fixed
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
lib/private/Remote/Credentials.php Outdated Show resolved Hide resolved
lib/private/Remote/Credentials.php Outdated Show resolved Hide resolved
lib/private/Remote/Credentials.php Outdated Show resolved Hide resolved
lib/private/Remote/Instance.php Outdated Show resolved Hide resolved
lib/private/Remote/User.php Outdated Show resolved Hide resolved
shdehnavi and others added 5 commits July 17, 2023 19:06
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
shdehnavi and others added 2 commits July 18, 2023 14:09
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
$status = $this->getStatus();
return $status['version'];
}

/**
* @return string 'http' or 'https'
* @return string|null 'http' or 'https'

Check failure

Code scanning / Psalm

ImplementedReturnTypeMismatch Error

The inherited return type 'string' for OCP\Remote\IInstance::getProtocol is different to the implemented return type for OC\Remote\Instance::getprotocol 'null|string'
@skjnldsv skjnldsv mentioned this pull request Nov 1, 2023
This was referenced Nov 6, 2023
This was referenced Nov 14, 2023
@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
This was referenced Mar 12, 2024
This was referenced Mar 20, 2024
@skjnldsv skjnldsv mentioned this pull request Mar 28, 2024
81 tasks
@skjnldsv skjnldsv modified the milestones: Nextcloud 29, Nextcloud 30 Mar 28, 2024
@skjnldsv skjnldsv added 2. developing Work in progress stale Ticket or PR with no recent activity and removed 3. to review Waiting for reviews labels Jul 27, 2024
This was referenced Jul 30, 2024
@skjnldsv skjnldsv closed this Aug 3, 2024
@skjnldsv skjnldsv removed this from the Nextcloud 30 milestone Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress stale Ticket or PR with no recent activity technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants