[PR #1601] [CLOSED] Refactor codes #1803

Closed
opened 2026-02-26 03:32:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/koel/koel/pull/1601
Author: @falahatiali
Created: 11/23/2022
Status: Closed

Base: masterHead: refactor


📝 Commits (1)

📊 Changes

11 files changed (+159 additions, -30 deletions)

View changed files

📝 app/Repositories/AlbumRepository.php (+22 -4)
📝 app/Repositories/ArtistRepository.php (+14 -2)
📝 app/Repositories/GenreRepository.php (+8 -1)
📝 app/Repositories/InteractionRepository.php (+9 -1)
📝 app/Repositories/PlaylistFolderRepository.php (+6 -0)
📝 app/Repositories/PlaylistRepository.php (+8 -1)
📝 app/Repositories/Repository.php (+8 -6)
📝 app/Repositories/RepositoryInterface.php (+7 -2)
📝 app/Repositories/SettingRepository.php (+6 -1)
📝 app/Repositories/SongRepository.php (+65 -12)
📝 app/Repositories/UserRepository.php (+6 -0)

📄 Description

I think it's more human-readable to have an abstract function for our repositories that just return the model class name as a string. because now it's not very clear what exactly the guessModelClass function does.

in addition, also I updated many functions phpDoc and make them better for reading.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/koel/koel/pull/1601 **Author:** [@falahatiali](https://github.com/falahatiali) **Created:** 11/23/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `refactor` --- ### 📝 Commits (1) - [`d400bca`](https://github.com/koel/koel/commit/d400bca8fa0339bcb4e79229fc3ee9bf7b2f8761) Refactor codes ### 📊 Changes **11 files changed** (+159 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `app/Repositories/AlbumRepository.php` (+22 -4) 📝 `app/Repositories/ArtistRepository.php` (+14 -2) 📝 `app/Repositories/GenreRepository.php` (+8 -1) 📝 `app/Repositories/InteractionRepository.php` (+9 -1) 📝 `app/Repositories/PlaylistFolderRepository.php` (+6 -0) 📝 `app/Repositories/PlaylistRepository.php` (+8 -1) 📝 `app/Repositories/Repository.php` (+8 -6) 📝 `app/Repositories/RepositoryInterface.php` (+7 -2) 📝 `app/Repositories/SettingRepository.php` (+6 -1) 📝 `app/Repositories/SongRepository.php` (+65 -12) 📝 `app/Repositories/UserRepository.php` (+6 -0) </details> ### 📄 Description I think it's more human-readable to have an abstract function for our repositories that just return the model class name as a string. because now it's not very clear what exactly the guessModelClass function does. in addition, also I updated many functions phpDoc and make them better for reading. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 03:32:22 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#1803
No description provided.