Commit Graph

13 Commits

Author SHA1 Message Date
Hugo Sales 2fd46ca886
[TOOLS] Continue raising PHPStan level to 6 2022-10-19 22:39:17 +01:00
Diogo Peralta Cordeiro 888c3798b7
[COMPONENT][Notification] Make logic more generic and robust
Fixed various bugs

Some important concepts to bear in mind:

* Notification: Associated with activities, won't be reconstructed
together with objects, can be thought of as transient

* Attention: Associated with objects, will be reconstructed with them, can
be thought as persistent

* Notifications and Attentions have no direct implications.

* Mentions are a specific form of attentions in notes, leads to the creation of Attentions.

Finally,

Potential PHP issue detected and reported: https://github.com/php/php-src/issues/8199
`static::method()` from a non static context (such as a class method) calls `__call`, rather than
the expected `__callStatic`. Can be fixed by using `(static fn() => static::method())()`, but the
usage of the magic method is strictly unnecessary in this case.
2022-03-14 11:37:09 +00:00
Diogo Peralta Cordeiro 3227e1f919
[CORE][Log] Document magic methods 2021-10-27 04:22:18 +01:00
Hugo Sales 9109c61af5
[TOOLS][CS-FIXER] Run new PHP CS Fixer config. Notably, adds strict_types 2021-10-27 04:19:28 +01:00
Hugo Sales add8f4a52f
[TOOLS] Fix all errors found by PHPStan level 1 2021-09-14 13:13:42 +01:00
Hugo Sales 2851b899b8
[TESTS] Add test annotations to core classes 2021-09-14 13:13:23 +01:00
Hugo Sales 38a331220f
[CORE][Log] Add Log::unexpected_exception utility which logs and throws a ServerException 2021-09-14 13:13:23 +01:00
Hugo Sales 3b18853ff1
[TESTS][LOG] Raise test coverage for Log class to 100% 2021-09-14 13:13:14 +01:00
Hugo Sales 8d25859de7
[LOG] Only try to log if setup, so logs can be disabled, in tests, for instance 2021-09-14 13:10:22 +01:00
Hugo Sales 460712e15e
[GIT] Change my email to the new one in all files and bump copyright year 2021-09-14 13:06:56 +01:00
Hugo Sales aae883880f
[LOG][WRAPPER] Refactor log wrapper 2021-09-14 13:05:33 +01:00
Hugo Sales 7c18f10bd2
[TOOLS] Fixed all licence blocks, to use the same, foldable, format 2021-09-14 13:05:26 +01:00
Hugo Sales dd559402cd
[CORE][UTIL] Moved classes from util to core
And splitted up Common
2021-09-14 13:05:25 +01:00