Commit Graph

1334 Commits

Author SHA1 Message Date
812424a619 GroundCover: drop useless variable in calculating startY 2020-02-06 14:26:03 +00:00
1bdc61dd5f Ore: do not destroy outer scope vars in for loops 2020-02-06 14:24:57 +00:00
86fc33fe26 Level: add phpstan generics to getNearestEntity() 2020-02-06 14:20:19 +00:00
1a5228e7a6 Fixed property types with missing null PhpDoc types 2020-02-05 20:55:03 +00:00
495bfda044 Drop a bunch of invalid null defaults
phpstan doesn't report these out of the box, for reasons I'm not clear on. It's also not clear if having null defaults has any effect on nullability behaviour, so they are best removed. In addition, these would be problematic on 7.4.
2020-02-05 20:53:54 +00:00
e1ddf90695 Chunk: remove useless instanceof checks
these are always CompoundTags, and if they aren't we have a bug somewhere else.
2020-02-05 20:44:27 +00:00
25554f0d61 Level: remove useless code from unload() 2020-02-05 20:39:38 +00:00
262728b091 PopulationTask: clean up overcomplicated garbage 2020-02-05 18:31:51 +00:00
fa82cb26d8 added native types to closures (phpstan-strict-rules) 2020-02-05 16:35:10 +00:00
e5a2cfb65f avoid type juggling in conditions, always use explicit boolean conditions 2020-02-05 15:44:06 +00:00
59cf8e95f0 Tree: fixed populator not growing trees any lower than y=2
this would only be a problem for custom generators, but nonetheless...
2020-02-05 13:17:09 +00:00
99038c752c Avoid usage of for-loop vars outside of for-loop context
these problems were reported by PHPStan strict rules. They aren't actually bugs, but they could become bugs in the future.
2020-02-05 13:16:09 +00:00
3f7e7352fb added SplFixedArray generics for phpstan 0.12.9 2020-02-05 11:57:37 +00:00
0a566f8218 LevelProvider::generate() accepts class-string<Generator>, not any
string
2020-02-01 20:16:05 +00:00
799183e13e make use of phpstan class-string in some areas 2020-01-30 22:23:11 +00:00
260ac47588 add some phpstan array types 2020-01-30 22:23:11 +00:00
a5764b3ae9 populate missing array value types in level namespace 2020-01-30 21:01:59 +00:00
64b3d02974 Chunk: remove useless condition from populateSkyLight()
this was detected by latest bleeding-edge PHPStan.
2020-01-29 16:42:42 +00:00
f6611a38bc Explosion: fix trailing whitespace in explodeA() phpdoc 2020-01-22 14:51:49 +00:00
f624871b3f strip extra blank lines (php-cs-fixer) 2020-01-22 14:50:29 +00:00
9f44adf04a pass 2, manual removal of incorrect non-nullable @param for nullable native types 2020-01-21 15:44:34 +00:00
c4793241f5 Mass removal of useless @param/@return PHPDoc annotations, pass 1 2020-01-21 15:10:18 +00:00
db734675d8 level: populate missing interface return types 2020-01-19 19:38:09 +00:00
6ede56015d level/biome: populate missing return type information 2020-01-19 19:37:08 +00:00
5334099fbf level/format: populate missing return type information 2020-01-19 19:36:34 +00:00
82e9072223 level/format/io: populate missing return type information 2020-01-19 19:35:45 +00:00
cd36af46bf Level: populate missing type information 2020-01-19 18:44:41 +00:00
aa7d55e21d level/generator: populate missing return type information 2020-01-19 18:07:54 +00:00
31e8efa6d1 level/light: populate missing return type information 2020-01-19 18:06:31 +00:00
260869c0d5 Position: populate missing return type information for fromObject() 2020-01-18 17:44:14 +00:00
d1e56c4611 Location: add missing return types for getYaw() and getPitch() 2020-01-14 15:34:40 +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
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
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
1eedac87b2 added missing @var property types (reported by phpstan) 2020-01-09 14:13:54 +00:00
e6a58e2690 format/leveldb: fix crash on truncated level.dat file 2020-01-08 09:55:03 +00:00
494660102e Replace empty() usages with count() 2019-12-18 11:23:24 +00:00
95c32d26df Explosion: fixed ray trace getting stuck on a block when it encounters an empty subchunk
this might have caused unexpected behaviour in large caves.
2019-12-13 18:07:59 +00:00
9e1f6a2486 protocol: updated particle IDs 2019-12-13 10:52:09 +00:00
cf73d74bd0 format/anvil: fixed possible type violation on saving chunk 2019-12-12 18:24:21 +00:00
37a8d95464 world IO: fixed crashes when garbage data found in tile/entity NBT data 2019-12-12 18:21:23 +00:00
77f7595e0e Location::__construct() accepts floats for x,y,z 2019-12-12 16:16:16 +00:00
e8d3a25028 Position::__construct() accepts floats for x,y,z 2019-12-12 16:15:49 +00:00
92be8c8ec0 PopulationTask: don't assume anything about TLS return values
while these SHOULD be what we say they are, it's possible for something else to overwrite them with junk and make the server catch fire.
2019-12-12 12:19:54 +00:00
62069bc7af Level: fix return type content doc comment for getAdjacentChunks() 2019-12-12 12:18:35 +00:00
b8778cb791 LevelProvider: fix doc comment of ::generate()
this raised false positives on phpstan level 4
2019-12-12 11:59:12 +00:00
7e98aa1497 leveldb: remove usage of multi-import statement
this doesn't conform to the code style.
2019-12-09 20:28:02 +00:00
c10ce84035 fix invisible legacy skins which have empty geometry names 2019-12-07 10:02:22 +00:00