-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Refactors theming app - part 4 #45146
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
/** | ||
* @param $app string app name | ||
* @return string|false image blob | ||
*/ | ||
public function getFavicon($app) { | ||
public function getFavicon($app): bool|string { |
Check notice
Code scanning / Psalm
MissingParamType Note
@@ -102,7 +85,7 @@ | |||
* @param $app string app name | |||
* @return string|false image blob | |||
*/ | |||
public function getTouchIcon($app) { | |||
public function getTouchIcon($app): bool|string { |
Check notice
Code scanning / Psalm
MissingParamType Note
@@ -125,7 +108,7 @@ | |||
* @param $size int size of the icon in px | |||
* @return Imagick|false | |||
*/ | |||
public function renderAppIcon($app, $size) { | |||
public function renderAppIcon($app, $size): Imagick|bool { |
Check notice
Code scanning / Psalm
MissingParamType Note
@@ -125,7 +108,7 @@ | |||
* @param $size int size of the icon in px | |||
* @return Imagick|false | |||
*/ | |||
public function renderAppIcon($app, $size) { | |||
public function renderAppIcon($app, $size): Imagick|bool { |
Check notice
Code scanning / Psalm
MissingParamType Note
@@ -227,7 +210,7 @@ | |||
* @param $image string relative path to svg file in app directory | |||
* @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 Note
@@ -227,7 +210,7 @@ | |||
* @param $image string relative path to svg file in app directory | |||
* @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 Note
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 Note
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 Note
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 Note
@@ -210,7 +192,7 @@ | |||
* @param $color | |||
* @return string base64 encoded radio button svg | |||
*/ | |||
public function generateRadioButton($color) { | |||
public function generateRadioButton($color): string { |
Check notice
Code scanning / Psalm
MissingParamType Note
… property promotion feature. Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
e94860a
to
407e780
Compare
Hello there, 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! |
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:
Checklist