mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 08:49:42 +00:00
Update PHP-CS-Fixer
This commit is contained in:
parent
6f3506360e
commit
f2e7473629
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@ -30,8 +30,8 @@ jobs:
|
|||||||
- name: Setup PHP and tools
|
- name: Setup PHP and tools
|
||||||
uses: shivammathur/setup-php@2.33.0
|
uses: shivammathur/setup-php@2.33.0
|
||||||
with:
|
with:
|
||||||
php-version: 8.2
|
php-version: 8.3
|
||||||
tools: php-cs-fixer:3.49
|
tools: php-cs-fixer:3.75
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
@ -6,6 +6,12 @@ $finder = PhpCsFixer\Finder::create()
|
|||||||
->in(__DIR__ . '/tests')
|
->in(__DIR__ . '/tests')
|
||||||
->in(__DIR__ . '/tools')
|
->in(__DIR__ . '/tools')
|
||||||
->notPath('plugins/DevTools')
|
->notPath('plugins/DevTools')
|
||||||
|
//JsonMapper will break if the FQNs in the doc comments for these are shortened :(
|
||||||
|
->notPath('crafting/json')
|
||||||
|
->notPath('inventory/json')
|
||||||
|
->notPath('data/bedrock/block/upgrade/model')
|
||||||
|
->notPath('data/bedrock/item/upgrade/model')
|
||||||
|
|
||||||
->notName('PocketMine.php');
|
->notName('PocketMine.php');
|
||||||
|
|
||||||
return (new PhpCsFixer\Config)
|
return (new PhpCsFixer\Config)
|
||||||
|
@ -31,8 +31,8 @@ require dirname(__DIR__) . '/vendor/autoload.php';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[]|\Closure[] $options
|
* @var string[]|Closure[] $options
|
||||||
* @phpstan-var array<string, string|\Closure() : string> $options
|
* @phpstan-var array<string, string|Closure() : string> $options
|
||||||
*/
|
*/
|
||||||
$options = [
|
$options = [
|
||||||
"base_version" => VersionInfo::BASE_VERSION,
|
"base_version" => VersionInfo::BASE_VERSION,
|
||||||
|
@ -32,7 +32,7 @@ use pocketmine\network\mcpe\protocol\types\CacheableNbt;
|
|||||||
use function get_class;
|
use function get_class;
|
||||||
|
|
||||||
abstract class Spawnable extends Tile{
|
abstract class Spawnable extends Tile{
|
||||||
/** @phpstan-var CacheableNbt<\pocketmine\nbt\tag\CompoundTag>|null */
|
/** @phpstan-var CacheableNbt<CompoundTag>|null */
|
||||||
private ?CacheableNbt $spawnCompoundCache = null;
|
private ?CacheableNbt $spawnCompoundCache = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -73,7 +73,7 @@ abstract class Spawnable extends Tile{
|
|||||||
* Returns encoded NBT (varint, little-endian) used to spawn this tile to clients. Uses cache where possible,
|
* Returns encoded NBT (varint, little-endian) used to spawn this tile to clients. Uses cache where possible,
|
||||||
* populates cache if it is null.
|
* populates cache if it is null.
|
||||||
*
|
*
|
||||||
* @phpstan-return CacheableNbt<\pocketmine\nbt\tag\CompoundTag>
|
* @phpstan-return CacheableNbt<CompoundTag>
|
||||||
*/
|
*/
|
||||||
final public function getSerializedSpawnCompound() : CacheableNbt{
|
final public function getSerializedSpawnCompound() : CacheableNbt{
|
||||||
if($this->spawnCompoundCache === null){
|
if($this->spawnCompoundCache === null){
|
||||||
|
@ -360,7 +360,7 @@ class World implements ChunkManager{
|
|||||||
|
|
||||||
private bool $doingTick = false;
|
private bool $doingTick = false;
|
||||||
|
|
||||||
/** @phpstan-var class-string<\pocketmine\world\generator\Generator> */
|
/** @phpstan-var class-string<generator\Generator> */
|
||||||
private string $generator;
|
private string $generator;
|
||||||
|
|
||||||
private bool $unloaded = false;
|
private bool $unloaded = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user