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) Increase phpstan level #3358

Merged
merged 11 commits into from
Jan 7, 2024

Conversation

Roardom
Copy link
Collaborator

@Roardom Roardom commented Jan 6, 2024

No description provided.

Copy link

what-the-diff bot commented Jan 6, 2024

PR Summary

  • Improved Input Processing Methods

    • In several controller files (ApplicationController.php, ContactController.php, and User/WishController.php), the method of handling incoming user data has been refined. This translates to a smoother and more accurate use of user inputs.
  • Validation Checks Added

    • Extensive validation checks have been incorporated into a number of controller files. These validations make sure that the type of file or input for different entities such as images, cover images, subtitles, torrents, etc., is as expected. These changes can be found in controllers like PlaylistController.php, PostController.php, Staff/ArticleController.php, etc. These checks will help prevent unexpected errors and streamline the course of uploading and updating content.
  • Removal of Unused Parameters

    • The removal of unused parameters from methods in Staff/ChatBotController.php, TorrentBuffController.php and TorrentDownloadController.php has made these bits of code cleaner and easier to understand. This reduces potential confusion for developers and enables more efficient coding changes in the future.
  • Assignment Removal and Validation Improvements

    • In User/TipController.php and User/TransactionController.php two changes were made: The removal of unnecessary assignment operations and the addition of improved input validations. These changes result in a more optimal use of resources and increased data integrity.
  • Change in Return Type

    • In Models/Forum.php, the return type of a method was changed to allow for the omission of a value (made nullable). This accommodates scenarios where a return value might not necessarily exist.
  • Mail Input Property Modification

    • In Mail/Contact.php, a property in the constructor method was renamed. This should make the code more self-explanatory and easier to maintain for developers.

@Roardom Roardom force-pushed the increase-phpstan-level branch 4 times, most recently from 989d8f8 to 7c92a28 Compare January 6, 2024 13:23
@Roardom Roardom marked this pull request as ready for review January 7, 2024 10:14
@HDVinnie HDVinnie merged commit 705ecdb into HDInnovations:7.x.x Jan 7, 2024
5 checks passed
@HDVinnie HDVinnie deleted the increase-phpstan-level branch January 7, 2024 20:09
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.

None yet

2 participants