Commit Graph

9093 Commits

Author SHA1 Message Date
d8acae5495 Door: add missing return type to getFullDamage() 2020-01-17 13:57:56 +00:00
239fe909be CobblestoneWall: add missing return type for canConnect() 2020-01-17 13:57:29 +00:00
c22576a266 CrashDump: add void native return types to private methods 2020-01-17 13:55:38 +00:00
bac788fd00 Timezone: add missing return type for detectSystemTimezone() 2020-01-15 20:18:35 +00:00
f6d96c5827 DataPacket: clean() returns $this, not void 2020-01-14 17:30:48 +00:00
b1458db47b Revert "CraftingDataPacket: fixed trying to return void result of parent function"
This reverts commit e12ecaf629.
2020-01-14 17:16:17 +00:00
2d2c9379cd DataPacket: apply @return void annotations to make phpstan happy
this eliminates 250+ errors on level 6.
2020-01-14 15:39:07 +00:00
3400771770 DataPacket: add missing return type info for pid() 2020-01-14 15:38:24 +00:00
e12ecaf629 CraftingDataPacket: fixed trying to return void result of parent function 2020-01-14 15:37:06 +00:00
1303cbfe02 UUID: add some missing return type annotations 2020-01-14 15:35:46 +00:00
ad4a211cba Color: add missing return type annotation for fromABGR() 2020-01-14 15:35:14 +00:00
d1e56c4611 Location: add missing return types for getYaw() and getPitch() 2020-01-14 15:34:40 +00:00
d9bbab54f4 Entity: fixing position and velocity sync on start/stop movement, closes #3133
the delta for velocity sync is WAYYYYYY too big, but that's a task for another commit.
2020-01-14 13:08:38 +00:00
07cf4eb7a9 Revert "Create .sonarcloud.properties"
This reverts commit 50a7663369.
2020-01-13 21:46:38 -06:00
50a7663369 Create .sonarcloud.properties 2020-01-13 21:31:36 -06:00
651ef500a3 Make pocketmine\PATH and pocketmine\RESOURCE_PATH always available
these are non-dependent on environment, so they can be determined with no external input.
    This fixes 2 PHPStan issues, fixes some code that couldn't run outside of PM, and makes it easier to write code that depends on PM.
2020-01-13 10:55:54 +00:00
30f2e75278 phpstan 0.12.5 2020-01-12 16:57:43 +00:00
2cfc25b4f8 phpstan: enable checkGenericClassInNonGenericObjectType 2020-01-11 23:04:16 +00:00
5bded9cff8 AttributeMap: add phpstan generic parameters for ArrayAccess 2020-01-11 23:03:21 +00:00
5816ff85ba don't depend on phpstan 0.12.4 phpdoc inheriting
this causes build failure because the parameter names are different to
the base class.
2020-01-11 22:08:16 +00:00
8f7d8347ee update pocketmine/spl dependency 2020-01-11 22:05:37 +00:00
3614d9a78d phpstan: enable MissingMethodParameterTypehintRule 2020-01-11 21:54:42 +00:00
818d0e19ab RCONInstance: remove always-false branch (readPacket() never returns null) 2020-01-11 21:54:03 +00:00
17720041a3 phpdoc: populate missing parameter typeinfo 2020-01-11 21:53:24 +00:00
c329ff7d4f SubChunk: remove nonsensical reference from internal function 2020-01-11 21:49:33 +00:00
8794292788 remove &$var reference notations in phpdoc
this isn't required by the spec and PHPStan chokes on it. I was previously having it ignore these errors, but it turns out that PHPStan is not making use of extended typeinfo provided if it can't parse the tag, which is problematic on level 6 and also a problem for array-of-type. Therefore, we are going to have to take the hit.
2020-01-11 21:20:55 +00:00
0a39e580e9 MainLogger: log exception chains in logException(), closes #2447
this method is simpler than #2447 and easier to apply to stable.
2020-01-09 21:01:12 +00:00
c4580dd56d MainLogger: extract a printErrorMessage() function from logException() 2020-01-09 20:51:13 +00:00
fab81d28bc MainLogger: always log exceptions with CRITICAL level
if we reached this point, it's almost always due to a general exception handler which doesn't know what else to do with the error.
2020-01-09 20:44:21 +00:00
039478223e phpstan: enable MissingFunctionReturnTypehintRule 2020-01-09 20:14:15 +00:00
64b5db4bf2 bootstrap: add some @return annotations for phpstan 2020-01-09 20:13:53 +00:00
c85f4256c7 phpstan: enable MissingFunctionParameterTypehintRule 2020-01-09 20:10:15 +00:00
1192b8bdf1 bootstrap: add PhpDoc to critical_error to make phpstan happy
it wants phpdoc or typehints, and we can't provide typehints because bootstrap needs to be compatible with old PHP versions.
2020-01-09 20:09:33 +00:00
6dcd2a4ece phpstan: start phasing in some level 6 checks 2020-01-09 19:56:04 +00:00
3fff0a0656 BigTree: evict unmaintained dead code
phpstan whines about all this stuff, and everything left is private, so we can get rid of it. Sadly we can't ditch the class without breaking BC, so that sticks with 4.0.
2020-01-09 14:26:46 +00:00
e1e1bfa5e3 CompressBatchedTask: remove useless code causing build failure
assuming that pthreads does not have leak issues, this code is pointless, and if pthreads does have leak issues, this may not prevent them anyway.
2020-01-09 14:19:35 +00:00
1eedac87b2 added missing @var property types (reported by phpstan) 2020-01-09 14:13:54 +00:00
cda3e6f4dc PluginDescription: clean up type information for extensions field 2020-01-09 11:20:01 +00:00
e6a58e2690 format/leveldb: fix crash on truncated level.dat file 2020-01-08 09:55:03 +00:00
27350c4673 3.11.4 is next 2020-01-04 16:46:55 +00:00
0d5704b156 Release 3.11.3 3.11.3 2020-01-04 16:46:55 +00:00
f355044626 resources: do not remove client-side resource packs when forcing resources
I wanted to make this into a dedicated option, but it had some side effects (see 4794ba236a).
I'll settle for just disabling this useless behaviour, since we have other ways to force vanilla resources anyway; setting this flag to always-false has no user-facing effects anyway.
2020-01-04 16:14:08 +00:00
4794ba236a Revert "resource packs: added new option remove_client_resources, fixed client packs being removed when forcing resource pack download"
This reverts commit 06ec8b8397.

unfortunately, this had some unanticipated side effects, thanks to
idiotic behaviour in the client ... when having optional downloads but
trying to force resources, the client chokes because it thinks the
server is forcing it to apply a pack that it doesn't have. Since
there's no way to detect when this problem occurs in the protocol, the
only option is to revert this.
2020-01-04 16:04:07 +00:00
6490a49c70 tests: drop lint.sh - no longer needed now that we have PHPStan 2020-01-04 15:23:53 +00:00
5cd7e11b29 Use specialized build script for Travis 2020-01-04 15:15:01 +00:00
08e3b8ffdc build: added specialized script to create a server phar
this is much easier to use than devtools, and allows us to make additional specializations for PM build that would otherwise just be a colossal pain in the ass.
2020-01-04 14:56:53 +00:00
9232f4509c TimingsHandler: don't bail on redundant attempts to stop non-running timers
while it would be nice to bail, providing the environment to allow bailing without breaking stuff requires some complex changes that would reduce performance when timings is not running. Considering the limited usefulness of bailing here anyway, and the fact that it just has to be prevented to not have side effects, it doesn't make a whole lot of sense right now.

closes #3261, closes #3269, closes #3254
2020-01-04 14:44:55 +00:00
cef77907c6 Timings: fixed grandparent timers not working correctly, closes #3229 2020-01-04 13:23:04 +00:00
06ec8b8397 resource packs: added new option remove_client_resources, fixed client packs being removed when forcing resource pack download 2020-01-04 13:16:47 +00:00
ee08286eca moved git hash detection code to its own unit 2020-01-02 21:01:31 +00:00