13 Commits

Author SHA1 Message Date
Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
Dylan K. Taylor
8b73549355
Use JSON_THROW_ON_ERROR for json_encode() and json_decode() 2021-12-08 19:14:07 +00:00
Dylan K. Taylor
269231c228
Ban foreach(arrayWithStringKeys as k => v)
this is not as good as phpstan/phpstan-src#769 (e.g. array_key_first()/array_key_last() aren't covered by this, nor is array_rand()) but it does eliminate the most infuriating cases where this usually crops up.
2021-11-15 22:52:05 +00:00
Dylan K. Taylor
a012e7ccc0
VersionInfo: make static methods more constant-like
if we could have class constants declared at runtime, these would be constant.
2021-08-16 16:37:36 +01:00
Dylan K. Taylor
981b0285d1
Isolate config casting nastiness in one place
this doesn't solve the underlying problem, but it does reduce the amount of noise made by PHPStan about it, as well as avoiding code litter.
2021-06-19 19:14:02 +01:00
Dylan K. Taylor
72de45f0e9
Drop pocketmine/uuid for ramsey/uuid 2021-03-16 23:03:00 +00:00
Dylan K. Taylor
2c29634d03 Remove VERSION and GIT_COMMIT constants
these are now lazily computed in VersionInfo as needed.
2020-07-25 19:17:33 +01:00
Dylan K. Taylor
2645b19617 Convert VersionInfo into a final class
this allows it to be loaded by the autoloader without additional changes.
2020-07-25 19:00:48 +01:00
Dylan K. Taylor
d9c3ec5f91 Merge branch 'stable'
# Conflicts:
#	resources/vanilla
2020-07-11 20:14:42 +01:00
Dylan K. Taylor
fe649d8d70 Extract ServerConfigGroup from Server
this API isn't very nice, but it's pretty much the same as the original, and at least this can be _kinda_ unit-tested...
2020-05-24 15:48:03 +01:00
Dylan K. Taylor
b7cf4f01f9 remove utils\UUID, switch to pocketmine/uuid package 2020-05-11 10:46:48 +01:00
Dylan K. Taylor
f9a587d40e imports cleanup 2020-04-28 17:27:38 +01:00
Dylan K. Taylor
f91e2f41e0 move SendUsageTask to stats namespace
maybe separate this out into a library?
2020-04-26 11:42:48 +01:00