From e41a2c0792b0cfc95b7b3e456e23dc8523adf201 Mon Sep 17 00:00:00 2001 From: SOFe Date: Mon, 23 Sep 2019 18:56:37 +0800 Subject: [PATCH 1/3] Link to StackOverflow in README (#3084) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e290302c4..a030cd012 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,10 @@ - [Docker image](https://hub.docker.com/r/pmmp/pocketmine-mp) - [Plugin repository](https://poggit.pmmp.io/plugins) -### Discussion +### Discussion/Help - [Forums](https://forums.pmmp.io/) - [Community Discord](https://discord.gg/bmSAZBG) +- [StackOverflow](https://stackoverflow.com/tags/pocketmine) ### For developers * [Latest API documentation](https://jenkins.pmmp.io/job/PocketMine-MP-doc/doxygen/) - Doxygen documentation generated from development From 7a2a4e2aa301816e05768ead38b516e42b410b7c Mon Sep 17 00:00:00 2001 From: Dylan T Date: Wed, 25 Sep 2019 12:59:04 +0100 Subject: [PATCH 2/3] change some heading sizes [ci skip] --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a030cd012..5b4e0fcbc 100644 --- a/README.md +++ b/README.md @@ -5,24 +5,24 @@ [![Build Status](https://travis-ci.org/pmmp/PocketMine-MP.svg?branch=master)](https://travis-ci.org/pmmp/PocketMine-MP) -### Getting started +## Getting started - [Documentation](http://pmmp.readthedocs.org/) - [Installation instructions](https://pmmp.readthedocs.io/en/rtfd/installation.html) - [Docker image](https://hub.docker.com/r/pmmp/pocketmine-mp) - [Plugin repository](https://poggit.pmmp.io/plugins) -### Discussion/Help +## Discussion/Help - [Forums](https://forums.pmmp.io/) - [Community Discord](https://discord.gg/bmSAZBG) - [StackOverflow](https://stackoverflow.com/tags/pocketmine) -### For developers +## For developers * [Latest API documentation](https://jenkins.pmmp.io/job/PocketMine-MP-doc/doxygen/) - Doxygen documentation generated from development * [DevTools](https://github.com/pmmp/PocketMine-DevTools/) - Development tools plugin for creating plugins * [ExamplePlugin](https://github.com/pmmp/ExamplePlugin/) - Example plugin demonstrating some basic API features * [Contributing Guidelines](CONTRIBUTING.md) -### Donate +## Donate - Bitcoin Cash (BCH): `qq3r46hn6ljnhnqnfwxt5pg3g447eq9jhvw5ddfear` - Bitcoin (BTC): `171u8K9e4FtU6j3e5sqNoxKUgEw9qWQdRV` - [Patreon](https://www.patreon.com/pocketminemp) From d0d61597c7c65af5587b182a02d81e68ff95046b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 26 Sep 2019 11:12:43 +0100 Subject: [PATCH 3/3] StupidJsonDecodeTest: use getClosure() instead of traditional mess this is faster and requires less code. --- tests/phpunit/network/mcpe/StupidJsonDecodeTest.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/network/mcpe/StupidJsonDecodeTest.php b/tests/phpunit/network/mcpe/StupidJsonDecodeTest.php index 40de1a35c..8fced8a71 100644 --- a/tests/phpunit/network/mcpe/StupidJsonDecodeTest.php +++ b/tests/phpunit/network/mcpe/StupidJsonDecodeTest.php @@ -26,6 +26,12 @@ namespace pocketmine\network\mcpe; use PHPUnit\Framework\TestCase; class StupidJsonDecodeTest extends TestCase{ + /** @var \Closure */ + private $stupidJsonDecodeFunc; + + public function setUp() : void{ + $this->stupidJsonDecodeFunc = (new \ReflectionMethod(PlayerNetworkSessionAdapter::class, 'stupid_json_decode'))->getClosure(); + } public function stupidJsonDecodeProvider() : array{ return [ @@ -48,10 +54,7 @@ class StupidJsonDecodeTest extends TestCase{ * @throws \ReflectionException */ public function testStupidJsonDecode(string $brokenJson, $expect){ - $func = new \ReflectionMethod(PlayerNetworkSessionAdapter::class, 'stupid_json_decode'); - $func->setAccessible(true); - - $decoded = $func->invoke(null, $brokenJson, true); + $decoded = ($this->stupidJsonDecodeFunc)($brokenJson, true); self::assertEquals($expect, $decoded); } }