Commit Graph

73 Commits

Author SHA1 Message Date
Roardom
3de7b17381 refactor: swap null coalescing for default model in user settings
Cleans up the code to remove null coalescing on user_settings when it doesn't exist. Sometimes null was unintentionally being cast to false. Allowing the user_setting remain optional allows the site administration to configure and change defaults for their users without it affecting users who have explicitly chosen their existing user settings.

Alternative to #4789
2025-06-20 03:00:48 +00:00
Roardom
604b7e1937 add: spell check ci
Just an initial portion for now fixing incorrect text and preventing future incorrect text. Eventually, I'd like to fix everything still listed under "ignoredWords" in cspell.json.
2025-01-24 11:30:34 +00:00
Roardom
5a9ae37921 update: use system user id constant in more places 2024-08-26 09:28:44 +00:00
Roardom
73da1a1eb3 add: types to chat repository
Just absolute minimal changes for now to prevent breakage as much as possible.
2024-08-10 03:15:36 +00:00
Roardom
64a60089d9 refactor: treat sprintf as native function
This breaks the pint CI currently. This is probably due to the next version of php (8.4) adding opcache optimizations to sprintf and our config requiring pre-slashing native functions.
2024-08-09 21:08:26 +00:00
Roardom
d00475778b update: normalize user settings
Use a 1-1 relation. Cache it indefinitely to reduce queries for every http request. This will make it much easier to add additional user settings for various site features without sacrificing clean code or performance.
2024-05-26 10:42:00 +00:00
Roardom
b86475a732 add: strict types to all files 2024-05-23 13:58:29 +00:00
HDVinnie
568a422cad security: chatbox data 2023-12-30 10:04:35 -05:00
HDVinnie
b3f0386149 cleanup: pt.1 2023-10-12 22:30:52 -04:00
Roardom
9d4789ba91 refactor: require whitespace before statements 2023-07-07 00:27:13 +00:00
Roardom
177c59d88d refactor: swap firstOrFail() for sole() to enforce a single result 2023-06-19 23:18:40 +00:00
HDVinnie
472c820f99 update: UNIT3D linting
- github action updated with new ruleset in pint.json
- codebase linted with new ruleset
- contributors can now run `./vendor/bin/pint`
- action workflow will auto correct any lint issues upon commit/opened pull request
2023-02-02 08:02:34 -05:00
HDVinnie
2ca429c4ce Revert "PSR12 Linting"
This reverts commit 7e65e1d589.
2022-09-11 19:51:58 -04:00
HDVinnie
7e65e1d589 PSR12 Linting 2022-09-11 23:50:41 +00:00
HDVinnie
594b7864d9 refactor: adopt new helpers in laravel 9 2022-03-06 17:20:05 -05:00
HDVinnie
166f3ccda8 update: repositories 2022-02-28 05:01:56 -05:00
HDVinnie
f9d2336e4f chore: lint 2022-01-23 17:58:09 -05:00
HDVinnie
00d00024e5 chore: cleanup 2022-01-23 17:42:16 -05:00
HDVinnie
98521378d2 chore: phpdoc blocks 2022-01-10 17:46:43 -05:00
HDVinnie
d7cb337f5f chore: streamline query builder orderBy calls with asc and desc arguments 2022-01-08 03:34:17 -05:00
HDVinnie
97394c062f chore: adopt type hints 2022-01-07 23:35:33 -05:00
HDVinnie
2a53cea216 refactor: newline after statement 2021-09-28 12:49:46 -04:00
HDVinnie
3407075214 refactor: better php8 usage
- Change simple property init and assign to constructor promotion
- Remove unused variable in catch()
- Change docs types to union types, where possible
2021-05-15 22:41:28 -04:00
HDVinnie
07bb03c9bc Revert "refactor: dynamic calls to static"
This reverts commit 71ff333eb4.
2021-05-09 10:49:39 -04:00
HDVinnie
71ff333eb4 refactor: dynamic calls to static 2021-04-27 21:35:23 -04:00
HDVinnie
74e9948b7c refactor: chat repository 2020-12-30 12:38:54 -05:00
HDVinnie
e52de0346d cleanup: chat repository 2020-12-28 23:53:35 -05:00
HDVinnie
467d31f10a refactor: constructor promotions 2020-12-17 23:25:50 -05:00
HDVinnie
7244ab85f8 Apply fixes from StyleCI
[ci skip] [skip ci]
2020-11-01 17:06:17 +00:00
HDVinnie
01093d711c Apply fixes from StyleCI
[ci skip] [skip ci]
2020-07-28 16:54:24 +00:00
HDVinnie
a975116218 refactor: preslash simple functions
- Add pre-slash to short named functions to improve performance by almost 30%
-  @see https://stackoverflow.com/questions/55419673/php7-adding-a-slash-to-all-standard-php-functions-php-cs-fixer-rule
2020-07-22 15:09:37 -04:00
HDVinnie
e7ccde0190 refactor: rename property to match type 2020-07-22 14:50:41 -04:00
HDVinnie
608c508fe7 refactor: symplify quote escapes 2020-04-24 11:19:08 -04:00
innocente205
7a119993fe Update ChatRepository.php
Lookup the 'command' instead of the 'slug' to allow changing the systembot name.
2020-04-19 12:58:49 +07:00
Ben Johnson
aa32a893fa tests: Implement TorrentController API tests
As part of this effort, a dedicated "torrents" storage location was
added to filesystems.php, which affects the torrent file storage
location. Accordingly, the torrent files in existing installations will
need to be moved (or symlinked) upon upgrade. The primary reason for
this change is mentioned in the Laravel docs: "This convention will
keep your publicly accessible files in one directory that can be easily
shared across deployments when using zero down-time deployment systems
like Envoyer."
2020-02-24 15:24:50 -05:00
Ben Johnson
5db70a9ea8 tests: Flesh-out several more ChatController tests 2020-02-20 16:38:43 -05:00
HDVinnie
605c337204 refactor: encapsed strings to sprintf 2020-02-17 13:52:20 -05:00
HDVinnie
285ecfa38b refactor: count on null 2020-02-12 19:15:58 -05:00
HDVinnie
780e0c1f0e chore: update license block 2020-02-12 15:05:34 -05:00
HDVinnie
c8f2390c4d Apply fixes from StyleCI
[ci skip] [skip ci]
2020-01-06 15:38:43 +00:00
HDVinnie
d889971834 Apply fixes from StyleCI
[ci skip] [skip ci]
2019-11-05 22:40:30 +00:00
HDVinnie
eed3b51c92 (Update) CRUDDY PT.7 🚀 2019-10-25 17:35:14 -04:00
Laravel Shift
d9ddbe6159 Shift cleanup 2019-05-09 00:05:27 +00:00
Laravel Shift
b0732954c4 Shift deprecated helpers
Laravel recommends using the `Str` and `Arr` class methods directly instead of the respective helper functions. These helper functions are [deprecated in Laravel 5.8][1] and will be removed in a future version.

[1]: https://github.com/laravel/framework/pull/26898
2019-05-09 00:05:08 +00:00
HDVinnie
ec897bb6de Apply fixes from StyleCI
[ci skip] [skip ci]
2019-03-19 19:33:47 +00:00
HDVinnie
7368b55602 (Fix) Issue #609 🐛
- This closes #609
- check to make sure message exsists before broadcasting and trying to delete.
2019-03-17 18:15:19 -04:00
HDVinnie
e0e1aa924b Apply fixes from StyleCI 2019-02-22 13:16:32 +00:00
HDVinnie
3c87845e54 (Update) Namespace models under App\Models 🚀 2019-02-22 08:15:41 -05:00
Laravel Shift
12397c9e6a Adopt PSR-2 coding style
The Laravel framework adopts the PSR-2 coding style in version 5.1.
Laravel apps *should* adopt this coding style as well. Read the
[PSR-2 coding style guide][1] for more details and check out [PHPCS][2]
to use as a code formatting tool.

[1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
[2]: https://github.com/squizlabs/PHP_CodeSniffer
2019-02-22 03:22:51 +00:00
HDVinnie
e3580dc6e1 (Update) ChatRepository 🚀
- remove duplicate code
2019-02-12 13:18:06 -05:00