Skip to content

Conversation

@fsamapoor
Copy link
Member

Summary

Following previous PRs taking advantage of PHP8's constructor property promotion, I have also made the required adjustments to the classes in the theming app.

I decided to split the changes into multiple PRs to make reviewing the changes easier.

The improvements in this PR include but are not limited to:

  • Using PHP8's constructor property promotion
  • Adding return types
  • Removing redundant docblocks

Checklist

@fsamapoor fsamapoor added 3. to review Waiting for reviews technical debt labels May 2, 2024
* @return string|false image blob
*/
public function getFavicon($app) {
public function getFavicon($app): bool|string {

Check notice

Code scanning / Psalm

MissingParamType

Parameter $app has no provided type
* @return string|false image blob
*/
public function getTouchIcon($app) {
public function getTouchIcon($app): bool|string {

Check notice

Code scanning / Psalm

MissingParamType

Parameter $app has no provided type
* @return Imagick|false
*/
public function renderAppIcon($app, $size) {
public function renderAppIcon($app, $size): Imagick|bool {

Check notice

Code scanning / Psalm

MissingParamType

Parameter $app has no provided type
* @return Imagick|false
*/
public function renderAppIcon($app, $size) {
public function renderAppIcon($app, $size): Imagick|bool {

Check notice

Code scanning / Psalm

MissingParamType

Parameter $size has no provided type
* @return string|false content of a colorized svg file
*/
public function colorSvg($app, $image) {
public function colorSvg($app, $image): bool|string {

Check notice

Code scanning / Psalm

MissingParamType

Parameter $app has no provided type
* @return string|false content of a colorized svg file
*/
public function colorSvg($app, $image) {
public function colorSvg($app, $image): bool|string {

Check notice

Code scanning / Psalm

MissingParamType

Parameter $image has no provided type
public function getImprintUrl() {
return (string)$this->config->getAppValue('theming', 'imprintUrl', '');
public function getImprintUrl(): string {
return $this->config->getAppValue('theming', 'imprintUrl', '');

Check notice

Code scanning / Psalm

DeprecatedMethod

The method OCP\IConfig::getAppValue has been marked as deprecated
public function getPrivacyUrl() {
return (string)$this->config->getAppValue('theming', 'privacyUrl', '');
public function getPrivacyUrl(): string {
return $this->config->getAppValue('theming', 'privacyUrl', '');

Check notice

Code scanning / Psalm

DeprecatedMethod

The method OCP\IConfig::getAppValue has been marked as deprecated
public function getDocBaseUrl() {
return (string)$this->config->getAppValue('theming', 'docBaseUrl', $this->docBaseUrl);
public function getDocBaseUrl(): string {
return $this->config->getAppValue('theming', 'docBaseUrl', $this->docBaseUrl);

Check notice

Code scanning / Psalm

DeprecatedMethod

The method OCP\IConfig::getAppValue has been marked as deprecated
* @return string base64 encoded radio button svg
*/
public function generateRadioButton($color) {
public function generateRadioButton($color): string {

Check notice

Code scanning / Psalm

MissingParamType

Parameter $color has no provided type
… property promotion feature.

Signed-off-by: Faraz Samapoor <[email protected]>
@fsamapoor fsamapoor force-pushed the refactor_theming_app_part4 branch from e94860a to 407e780 Compare May 2, 2024 08:33
@fsamapoor fsamapoor requested review from a team, ArtificialOwl, icewind1991 and yemkareems and removed request for a team May 2, 2024 08:35
@github-actions
Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

@solracsf solracsf added this to the Nextcloud 30 milestone Jun 18, 2024
This was referenced Jul 30, 2024
This was referenced Aug 5, 2024
@skjnldsv skjnldsv mentioned this pull request Aug 13, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 30, Nextcloud 31 Aug 14, 2024
@blizzz blizzz mentioned this pull request Jan 8, 2025
@skjnldsv skjnldsv mentioned this pull request Jan 14, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 31, Nextcloud 32 Jan 14, 2025
@skjnldsv
Copy link
Member

skjnldsv commented Aug 1, 2025

Hey @fsamapoor closing, there's too much conflicts and/or changes got applied already via another PR.
But I'd like to personally thank you again for all the other PRs we were able to merge.

We're slowly deploying rector that should help us continuing the refactoring on the long run! Have a lovely day!!

@skjnldsv skjnldsv closed this Aug 1, 2025
@fsamapoor fsamapoor deleted the refactor_theming_app_part4 branch August 2, 2025 07:39
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants