From e74c24873b468abb6e103d6616f4f2bf06c048a3 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Wed, 10 Nov 2021 22:38:39 -0500 Subject: [PATCH 01/32] added main workflow --- .github/workflows/main.yml | 254 +++++++++++++++++++++++++++++++++++++ .php-cs-fixer.php | 74 +++++++++++ 2 files changed, 328 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 .php-cs-fixer.php diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..392d75f8 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,254 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + build-php: + name: Prepare PHP + runs-on: ${{ matrix.image }} + + strategy: + matrix: + image: [ubuntu-20.04] + php: [8.0.11] + + steps: + - name: Build and prepare PHP cache + uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 + with: + php-version: ${{ matrix.php }} + install-path: "./bin" + + build-pocketmine: + name: Prepare PocketMine + needs: build-php + runs-on: ${{ matrix.image }} + + strategy: + matrix: + image: [ ubuntu-20.04 ] + php: [ 8.0.11 ] + + steps: + - name: Build and prepare PHP cache + uses: actions/checkout@v2 + with: + repository: pmmp/PocketMine-MP + submodules: recursive + ref: stable + path: "./" + + - name: Install Composer + run: curl -sS https://getcomposer.org/installer | php + + - name: Restore Composer package cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/composer/files + ~/.cache/composer/vcs + key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}" + restore-keys: | + composer-v2-cache- + + - name: Install Composer dependencies + run: php composer.phar install --prefer-dist --no-interaction + + phpstan: + name: PHPStan analysis + needs: build-pocketmine + runs-on: ${{ matrix.image }} + + strategy: + fail-fast: false + matrix: + image: [ubuntu-20.04] + php: [8.0.11] + + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + with: + path: "./plugins/${{ github.event.repository.name }}" + + - name: Setup PHP + uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 + with: + php-version: ${{ matrix.php }} + install-path: "./bin" + + - name: Run PHPStan + run: ./vendor/bin/phpstan analyze --no-progress --memory-limit=2G + + phpunit: + name: PHPUnit tests + needs: build-pocketmine + runs-on: ${{ matrix.image }} + strategy: + fail-fast: false + matrix: + image: [ubuntu-20.04] + php: [8.0.11] + + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + with: + path: "./plugins/${{ github.event.repository.name }}" + + - name: Setup PHP + uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 + with: + php-version: ${{ matrix.php }} + install-path: "./bin" + + - name: Install Composer + run: curl -sS https://getcomposer.org/installer | php + + - name: Restore Composer package cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/composer/files + ~/.cache/composer/vcs + key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}" + restore-keys: | + composer-v2-cache- + + - name: Install Composer dependencies + run: php composer.phar install --prefer-dist --no-interaction + + - name: Run PHPUnit tests + run: ./vendor/bin/phpunit --bootstrap vendor/autoload.php --fail-on-warning tests/phpunit + + integration: + name: Integration tests + needs: build-pocketmine + runs-on: ${{ matrix.image }} + strategy: + fail-fast: false + matrix: + image: [ubuntu-20.04] + php: [8.0.11] + + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + with: + path: "./plugins/${{ github.event.repository.name }}" + + - name: Setup PHP + uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 + with: + php-version: ${{ matrix.php }} + install-path: "./bin" + + - name: Install Composer + run: curl -sS https://getcomposer.org/installer | php + + - name: Restore Composer package cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/composer/files + ~/.cache/composer/vcs + key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}" + restore-keys: | + composer-v2-cache- + + - name: Install Composer dependencies + run: php composer.phar install --no-dev --prefer-dist --no-interaction + + - name: Run integration tests + run: ./tests/travis.sh -t4 + + preprocessor: + name: Preprocessor tests + needs: build-php + runs-on: ${{ matrix.image }} + strategy: + fail-fast: false + matrix: + image: [ubuntu-20.04] + php: [8.0.11] + + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + with: + path: "./plugins/${{ github.event.repository.name }}" + + - name: Setup PHP + uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 + with: + php-version: ${{ matrix.php }} + install-path: "./bin" + + - name: Install Composer + run: curl -sS https://getcomposer.org/installer | php + + - name: Restore Composer package cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/composer/files + ~/.cache/composer/vcs + key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}" + restore-keys: | + composer-v2-cache- + + - name: Install Composer dependencies + run: php composer.phar install --no-dev --prefer-dist --no-interaction + + - name: Run preprocessor + run: | + PM_PREPROCESSOR_PATH="$GITHUB_WORKSPACE/build/preprocessor" + php "$PM_PREPROCESSOR_PATH/PreProcessor.php" --path=src --multisize || (echo "Preprocessor exited with code $?" && exit 1) + + #dump the diff of preprocessor replacements to a patch in case it has bugs + git diff > preprocessor_diff.patch + + VENDOR_PM="$GITHUB_WORKSPACE/vendor" + VENDOR_PM_BACKUP="$GITHUB_WORKSPACE/vendor-before-preprocess" + cp -r "$VENDOR_PM" "$VENDOR_PM_BACKUP" + for f in $(ls $VENDOR_PM/pocketmine); do + echo "Processing directory \"$f\"..." + php "$PM_PREPROCESSOR_PATH/PreProcessor.php" --path="$VENDOR_PM/pocketmine/$f/src" --multisize || (echo "Preprocessor exited with code $?" && exit 1) + echo "Checking for changes in \"$f\"..." + DIFF=$(git diff --no-index "$VENDOR_PM_BACKUP/pocketmine/$f" "$VENDOR_PM/pocketmine/$f" || true) + if [ "$DIFF" != "" ]; then + PATCH="$GITHUB_WORKSPACE/preprocessor_diff_$f.patch" + echo "$DIFF" > "$PATCH" + echo "Generated patch file \"$PATCH\"" + else + echo "No diff generated for \"$f\" (preprocessor made no changes)" + fi + done + + - name: Upload preprocessor diffs + uses: actions/upload-artifact@v2 + if: always() + with: + name: preprocessor_diffs_${{ matrix.php }}_${{ matrix.image }} + path: ${{ github.workspace }}/preprocessor_diff*.patch + + codestyle: + name: Code Style checks + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP and tools + uses: shivammathur/setup-php@2.15.0 + with: + php-version: 8.0 + tools: php-cs-fixer:3.2 + + - name: Run PHP-CS-Fixer + run: php-cs-fixer fix --dry-run --diff diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php new file mode 100644 index 00000000..ff82096c --- /dev/null +++ b/.php-cs-fixer.php @@ -0,0 +1,74 @@ +in(__DIR__ . '/src') + ->in(__DIR__ . '/build') + ->in(__DIR__ . '/tests') + ->notPath('preprocessor'); + +return (new PhpCsFixer\Config) + ->setRiskyAllowed(true) + ->setRules([ + 'align_multiline_comment' => [ + 'comment_type' => 'phpdocs_only' + ], + 'array_indentation' => true, + 'array_syntax' => [ + 'syntax' => 'short' + ], + 'blank_line_after_namespace' => true, + 'blank_line_after_opening_tag' => true, + 'blank_line_before_statement' => [ + 'statements' => [ + 'declare' + ] + ], + 'cast_spaces' => [ + 'space' => 'single' + ], + 'concat_space' => [ + 'spacing' => 'one' + ], + 'declare_strict_types' => true, + 'elseif' => true, + 'global_namespace_import' => [ + 'import_constants' => true, + 'import_functions' => true, + 'import_classes' => null, + ], + 'indentation_type' => true, + 'native_function_invocation' => [ + 'scope' => 'namespaced', + 'include' => ['@all'], + ], + 'no_closing_tag' => true, + 'no_empty_phpdoc' => true, + 'no_extra_blank_lines' => true, + 'no_superfluous_phpdoc_tags' => [ + 'allow_mixed' => true, + ], + 'no_trailing_whitespace' => true, + 'no_trailing_whitespace_in_comment' => true, + 'no_whitespace_in_blank_line' => true, + 'no_unused_imports' => true, + 'ordered_imports' => [ + 'imports_order' => [ + 'class', + 'function', + 'const', + ], + 'sort_algorithm' => 'alpha' + ], + 'phpdoc_line_span' => [ + 'property' => 'single', + 'method' => null, + 'const' => null + ], + 'phpdoc_trim' => true, + 'phpdoc_trim_consecutive_blank_line_separation' => true, + 'single_import_per_statement' => true, + 'strict_param' => true, + ]) + ->setFinder($finder) + ->setIndent("\t") + ->setLineEnding("\n"); From 32c010d7eb1440209584df903cd25cb1b9dce694 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Wed, 10 Nov 2021 22:40:27 -0500 Subject: [PATCH 02/32] workflow formatting --- .github/workflows/main.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 392d75f8..0f6730cf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,20 +42,20 @@ jobs: path: "./" - name: Install Composer - run: curl -sS https://getcomposer.org/installer | php + run: curl -sS https://getcomposer.org/installer | php - name: Restore Composer package cache - uses: actions/cache@v2 - with: - path: | - ~/.cache/composer/files - ~/.cache/composer/vcs - key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}" - restore-keys: | - composer-v2-cache- + uses: actions/cache@v2 + with: + path: | + ~/.cache/composer/files + ~/.cache/composer/vcs + key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}" + restore-keys: | + composer-v2-cache- - name: Install Composer dependencies - run: php composer.phar install --prefer-dist --no-interaction + run: php composer.phar install --prefer-dist --no-interaction phpstan: name: PHPStan analysis From d964a776d871909b34758703dd3b755d83c9fe35 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Wed, 10 Nov 2021 22:45:33 -0500 Subject: [PATCH 03/32] rename task --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0f6730cf..11eb7f31 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: php: [ 8.0.11 ] steps: - - name: Build and prepare PHP cache + - name: Checkout PocketMine uses: actions/checkout@v2 with: repository: pmmp/PocketMine-MP From c23d183c9b28ea3fc044b3fa5ee959b179c5078f Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Wed, 10 Nov 2021 22:47:00 -0500 Subject: [PATCH 04/32] fixed cs fixer --- .php-cs-fixer.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index ff82096c..8eda195f 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -1,10 +1,7 @@ in(__DIR__ . '/src') - ->in(__DIR__ . '/build') - ->in(__DIR__ . '/tests') - ->notPath('preprocessor'); + ->in(__DIR__ . '/src'); return (new PhpCsFixer\Config) ->setRiskyAllowed(true) From fe332f5bde4025e0fa6125063826133676d78530 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Wed, 10 Nov 2021 23:03:43 -0500 Subject: [PATCH 05/32] Removed preprocessor + fixed integrations --- .github/workflows/main.yml | 75 ++----------------------------------- tests/integration-action.sh | 53 ++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 71 deletions(-) create mode 100644 tests/integration-action.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11eb7f31..8ae66df4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,6 +69,9 @@ jobs: php: [8.0.11] steps: + - name: Replace PocketMine Phpstan config + run: alias + - name: Checkout Repo uses: actions/checkout@v2 with: @@ -163,77 +166,7 @@ jobs: run: php composer.phar install --no-dev --prefer-dist --no-interaction - name: Run integration tests - run: ./tests/travis.sh -t4 - - preprocessor: - name: Preprocessor tests - needs: build-php - runs-on: ${{ matrix.image }} - strategy: - fail-fast: false - matrix: - image: [ubuntu-20.04] - php: [8.0.11] - - steps: - - name: Checkout Repo - uses: actions/checkout@v2 - with: - path: "./plugins/${{ github.event.repository.name }}" - - - name: Setup PHP - uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 - with: - php-version: ${{ matrix.php }} - install-path: "./bin" - - - name: Install Composer - run: curl -sS https://getcomposer.org/installer | php - - - name: Restore Composer package cache - uses: actions/cache@v2 - with: - path: | - ~/.cache/composer/files - ~/.cache/composer/vcs - key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}" - restore-keys: | - composer-v2-cache- - - - name: Install Composer dependencies - run: php composer.phar install --no-dev --prefer-dist --no-interaction - - - name: Run preprocessor - run: | - PM_PREPROCESSOR_PATH="$GITHUB_WORKSPACE/build/preprocessor" - php "$PM_PREPROCESSOR_PATH/PreProcessor.php" --path=src --multisize || (echo "Preprocessor exited with code $?" && exit 1) - - #dump the diff of preprocessor replacements to a patch in case it has bugs - git diff > preprocessor_diff.patch - - VENDOR_PM="$GITHUB_WORKSPACE/vendor" - VENDOR_PM_BACKUP="$GITHUB_WORKSPACE/vendor-before-preprocess" - cp -r "$VENDOR_PM" "$VENDOR_PM_BACKUP" - for f in $(ls $VENDOR_PM/pocketmine); do - echo "Processing directory \"$f\"..." - php "$PM_PREPROCESSOR_PATH/PreProcessor.php" --path="$VENDOR_PM/pocketmine/$f/src" --multisize || (echo "Preprocessor exited with code $?" && exit 1) - echo "Checking for changes in \"$f\"..." - DIFF=$(git diff --no-index "$VENDOR_PM_BACKUP/pocketmine/$f" "$VENDOR_PM/pocketmine/$f" || true) - if [ "$DIFF" != "" ]; then - PATCH="$GITHUB_WORKSPACE/preprocessor_diff_$f.patch" - echo "$DIFF" > "$PATCH" - echo "Generated patch file \"$PATCH\"" - else - echo "No diff generated for \"$f\" (preprocessor made no changes)" - fi - done - - - name: Upload preprocessor diffs - uses: actions/upload-artifact@v2 - if: always() - with: - name: preprocessor_diffs_${{ matrix.php }}_${{ matrix.image }} - path: ${{ github.workspace }}/preprocessor_diff*.patch + run: ./plugins/${{ github.event.repository.name }}/integration-action.sh -t4 codestyle: name: Code Style checks diff --git a/tests/integration-action.sh b/tests/integration-action.sh new file mode 100644 index 00000000..e16a2833 --- /dev/null +++ b/tests/integration-action.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +PM_WORKERS="auto" + +while getopts "t:" OPTION 2> /dev/null; do + case ${OPTION} in + t) + PM_WORKERS="$OPTARG" + ;; + esac +done + +#Run-the-server tests +DATA_DIR="$(pwd)/test_data" +PLUGINS_DIR="$DATA_DIR/plugins" + +rm -rf "$DATA_DIR" +rm PocketMine-MP.phar 2> /dev/null +mkdir "$DATA_DIR" +mkdir "$PLUGINS_DIR" + +cd tests/plugins/DevTools +php -dphar.readonly=0 ./src/DevTools/ConsoleScript.php --make ./ --relative ./ --out "$PLUGINS_DIR/DevTools.phar" +cd ../../.. +composer make-server + +if [ -f PocketMine-MP.phar ]; then + echo Server phar created successfully. +else + echo Server phar was not created! + exit 1 +fi + +cp -r tests/plugins/TesterPlugin "$PLUGINS_DIR" +echo -e "stop\n" | php PocketMine-MP.phar --no-wizard --disable-ansi --disable-readline --debug.level=2 --data="$DATA_DIR" --plugins="$PLUGINS_DIR" --anonymous-statistics.enabled=0 --settings.async-workers="$PM_WORKERS" --settings.enable-dev-builds=1 + +output=$(grep '\[TesterPlugin\]' "$DATA_DIR/server.log") +if [ "$output" == "" ]; then + echo TesterPlugin failed to run tests, check the logs + exit 1 +fi + +result=$(echo "$output" | grep 'Finished' | grep -v 'PASS') +if [ "$result" != "" ]; then + echo "$result" + echo Some tests did not complete successfully, changing build status to failed + exit 1 +elif [ $(grep -c "ERROR\|CRITICAL\|EMERGENCY" "$DATA_DIR/server.log") -ne 0 ]; then + echo Server log contains error messages, changing build status to failed + exit 1 +else + echo All tests passed +fi From 81fb465ab1c00ed507d3ab40385f893b674f962d Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Wed, 10 Nov 2021 23:21:36 -0500 Subject: [PATCH 06/32] try fixing composer --- .github/workflows/main.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8ae66df4..a64b9fce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,16 +44,6 @@ jobs: - name: Install Composer run: curl -sS https://getcomposer.org/installer | php - - name: Restore Composer package cache - uses: actions/cache@v2 - with: - path: | - ~/.cache/composer/files - ~/.cache/composer/vcs - key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}" - restore-keys: | - composer-v2-cache- - - name: Install Composer dependencies run: php composer.phar install --prefer-dist --no-interaction From 7072ea78569860c68859b7ab3d9a363011629e69 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Wed, 10 Nov 2021 23:50:10 -0500 Subject: [PATCH 07/32] php changes --- .github/workflows/main.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a64b9fce..746541b7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,13 +37,29 @@ jobs: uses: actions/checkout@v2 with: repository: pmmp/PocketMine-MP - submodules: recursive + submodules: true ref: stable path: "./" + - name: Setup PHP + uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 + with: + php-version: ${{ matrix.php }} + install-path: "./bin" + - name: Install Composer run: curl -sS https://getcomposer.org/installer | php + - name: Restore Composer package cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/composer/files + ~/.cache/composer/vcs + key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}" + restore-keys: | + composer-v2-cache- + - name: Install Composer dependencies run: php composer.phar install --prefer-dist --no-interaction From ae10bb550f0d3650078d08c614decf3e77a74f02 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Wed, 10 Nov 2021 23:56:03 -0500 Subject: [PATCH 08/32] modified phpstan config --- .github/workflows/main.yml | 6 ++--- tests/phpstan.neon.dist | 54 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 tests/phpstan.neon.dist diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 746541b7..d4ce2e0a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,14 +75,14 @@ jobs: php: [8.0.11] steps: - - name: Replace PocketMine Phpstan config - run: alias - - name: Checkout Repo uses: actions/checkout@v2 with: path: "./plugins/${{ github.event.repository.name }}" + - name: Replace PocketMine Phpstan config + run: cp -f ./plugins/tests/phpstan.neon.dist phpstan.neon.dist + - name: Setup PHP uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 with: diff --git a/tests/phpstan.neon.dist b/tests/phpstan.neon.dist new file mode 100644 index 00000000..0293b28d --- /dev/null +++ b/tests/phpstan.neon.dist @@ -0,0 +1,54 @@ +includes: + - tests/phpstan/configs/actual-problems.neon + - tests/phpstan/configs/gc-hacks.neon + - tests/phpstan/configs/php-bugs.neon + - tests/phpstan/configs/phpstan-bugs.neon + - tests/phpstan/configs/phpunit-wiring-tests.neon + - tests/phpstan/configs/pthreads-bugs.neon + - tests/phpstan/configs/runtime-type-checks.neon + - tests/phpstan/configs/spl-fixed-array-sucks.neon + - vendor/phpstan/phpstan-phpunit/extension.neon + - vendor/phpstan/phpstan-phpunit/rules.neon + - vendor/phpstan/phpstan-strict-rules/rules.neon + +parameters: + level: 8 + checkMissingCallableSignature: true + treatPhpDocTypesAsCertain: false + bootstrapFiles: + - tests/phpstan/bootstrap.php + scanDirectories: + - build + - tests/plugins/TesterPlugin + scanFiles: + - src/pocketmine/PocketMine.php + paths: + - build + - src + - tests/phpunit + - tests/plugins/TesterPlugin + - plugins + - virions + excludePaths: + analyseAndScan: + - build/php + - build/preprocessor + analyse: + - src/pocketmine/block/StoneSlab.php #overrides STONE constant + - src/pocketmine/item/Potion.php #overrides WATER constant + dynamicConstantNames: + - pocketmine\DEBUG + - pocketmine\IS_DEVELOPMENT_BUILD + stubFiles: + - tests/phpstan/stubs/chunkutils.stub + - tests/phpstan/stubs/leveldb.stub + - tests/phpstan/stubs/pthreads.stub + reportUnmatchedIgnoredErrors: false #no other way to silence platform-specific non-warnings + staticReflectionClassNamePatterns: + - "#^COM$#" + typeAliases: + #variadics don't work for this - mixed probably shouldn't work either, but for now it does + #what we actually need is something that accepts an infinite number of parameters, but in the absence of that, + #we'll just fill it with 10 - it's very unlikely to encounter a callable with 10 parameters anyway. + anyCallable: 'callable(never, never, never, never, never, never, never, never, never, never) : mixed' + anyClosure: '\Closure(never, never, never, never, never, never, never, never, never, never) : mixed' From 00379354c0c15d38173a57b14ba76eccd998ddcf Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Wed, 10 Nov 2021 23:57:03 -0500 Subject: [PATCH 09/32] thank you for always auto indenting -_- --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d4ce2e0a..c97e43af 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -81,7 +81,7 @@ jobs: path: "./plugins/${{ github.event.repository.name }}" - name: Replace PocketMine Phpstan config - run: cp -f ./plugins/tests/phpstan.neon.dist phpstan.neon.dist + run: cp -f ./plugins/tests/phpstan.neon.dist phpstan.neon.dist - name: Setup PHP uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 From d0ccb8951268e20cdc263cadff3200a0d8047cda Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Wed, 10 Nov 2021 23:58:31 -0500 Subject: [PATCH 10/32] fixed bad path --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c97e43af..95fc5885 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -81,7 +81,7 @@ jobs: path: "./plugins/${{ github.event.repository.name }}" - name: Replace PocketMine Phpstan config - run: cp -f ./plugins/tests/phpstan.neon.dist phpstan.neon.dist + run: cp -f ./plugins/${{ github.event.repository.name }}/tests/phpstan.neon.dist phpstan.neon.dist - name: Setup PHP uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 From a29656c2251d8b07ce4475f7aed3725221a8d853 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Thu, 11 Nov 2021 00:07:24 -0500 Subject: [PATCH 11/32] I figured it out --- .github/workflows/main.yml | 63 +++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 95fc5885..6bd90adf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,15 +22,16 @@ jobs: php-version: ${{ matrix.php }} install-path: "./bin" - build-pocketmine: - name: Prepare PocketMine - needs: build-php + phpstan: + name: PHPStan analysis + needs: build-pocketmine runs-on: ${{ matrix.image }} strategy: + fail-fast: false matrix: - image: [ ubuntu-20.04 ] - php: [ 8.0.11 ] + image: [ubuntu-20.04] + php: [8.0.11] steps: - name: Checkout PocketMine @@ -41,6 +42,14 @@ jobs: ref: stable path: "./" + - name: Checkout Repo + uses: actions/checkout@v2 + with: + path: "./plugins/${{ github.event.repository.name }}" + + - name: Replace PocketMine Phpstan config + run: cp -f ./plugins/${{ github.event.repository.name }}/tests/phpstan.neon.dist phpstan.neon.dist + - name: Setup PHP uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 with: @@ -63,32 +72,6 @@ jobs: - name: Install Composer dependencies run: php composer.phar install --prefer-dist --no-interaction - phpstan: - name: PHPStan analysis - needs: build-pocketmine - runs-on: ${{ matrix.image }} - - strategy: - fail-fast: false - matrix: - image: [ubuntu-20.04] - php: [8.0.11] - - steps: - - name: Checkout Repo - uses: actions/checkout@v2 - with: - path: "./plugins/${{ github.event.repository.name }}" - - - name: Replace PocketMine Phpstan config - run: cp -f ./plugins/${{ github.event.repository.name }}/tests/phpstan.neon.dist phpstan.neon.dist - - - name: Setup PHP - uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 - with: - php-version: ${{ matrix.php }} - install-path: "./bin" - - name: Run PHPStan run: ./vendor/bin/phpstan analyze --no-progress --memory-limit=2G @@ -103,6 +86,14 @@ jobs: php: [8.0.11] steps: + - name: Checkout PocketMine + uses: actions/checkout@v2 + with: + repository: pmmp/PocketMine-MP + submodules: true + ref: stable + path: "./" + - name: Checkout Repo uses: actions/checkout@v2 with: @@ -131,7 +122,7 @@ jobs: run: php composer.phar install --prefer-dist --no-interaction - name: Run PHPUnit tests - run: ./vendor/bin/phpunit --bootstrap vendor/autoload.php --fail-on-warning tests/phpunit + run: ./vendor/bin/phpunit --bootstrap vendor/autoload.php --fail-on-warning ./plugins/${{ github.event.repository.name }}/tests/phpunit integration: name: Integration tests @@ -144,6 +135,14 @@ jobs: php: [8.0.11] steps: + - name: Checkout PocketMine + uses: actions/checkout@v2 + with: + repository: pmmp/PocketMine-MP + submodules: true + ref: stable + path: "./" + - name: Checkout Repo uses: actions/checkout@v2 with: From ce22b558095567cd5be00fff88a2e3883af6b0ee Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Thu, 11 Nov 2021 00:08:04 -0500 Subject: [PATCH 12/32] corrections: now I figured it out --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6bd90adf..a38ad7bf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: phpstan: name: PHPStan analysis - needs: build-pocketmine + needs: build-php runs-on: ${{ matrix.image }} strategy: @@ -77,7 +77,7 @@ jobs: phpunit: name: PHPUnit tests - needs: build-pocketmine + needs: build-php runs-on: ${{ matrix.image }} strategy: fail-fast: false @@ -126,7 +126,7 @@ jobs: integration: name: Integration tests - needs: build-pocketmine + needs: build-php runs-on: ${{ matrix.image }} strategy: fail-fast: false From f01fb22ec70832decb4c980ad15959374b5d9472 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Thu, 11 Nov 2021 17:43:42 -0500 Subject: [PATCH 13/32] We don't have phpunit tests yet --- .github/workflows/main.yml | 96 +++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a38ad7bf..8073a146 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,54 +75,54 @@ jobs: - name: Run PHPStan run: ./vendor/bin/phpstan analyze --no-progress --memory-limit=2G - phpunit: - name: PHPUnit tests - needs: build-php - runs-on: ${{ matrix.image }} - strategy: - fail-fast: false - matrix: - image: [ubuntu-20.04] - php: [8.0.11] - - steps: - - name: Checkout PocketMine - uses: actions/checkout@v2 - with: - repository: pmmp/PocketMine-MP - submodules: true - ref: stable - path: "./" - - - name: Checkout Repo - uses: actions/checkout@v2 - with: - path: "./plugins/${{ github.event.repository.name }}" - - - name: Setup PHP - uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 - with: - php-version: ${{ matrix.php }} - install-path: "./bin" - - - name: Install Composer - run: curl -sS https://getcomposer.org/installer | php - - - name: Restore Composer package cache - uses: actions/cache@v2 - with: - path: | - ~/.cache/composer/files - ~/.cache/composer/vcs - key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}" - restore-keys: | - composer-v2-cache- - - - name: Install Composer dependencies - run: php composer.phar install --prefer-dist --no-interaction - - - name: Run PHPUnit tests - run: ./vendor/bin/phpunit --bootstrap vendor/autoload.php --fail-on-warning ./plugins/${{ github.event.repository.name }}/tests/phpunit +# phpunit: +# name: PHPUnit tests +# needs: build-php +# runs-on: ${{ matrix.image }} +# strategy: +# fail-fast: false +# matrix: +# image: [ubuntu-20.04] +# php: [8.0.11] +# +# steps: +# - name: Checkout PocketMine +# uses: actions/checkout@v2 +# with: +# repository: pmmp/PocketMine-MP +# submodules: true +# ref: stable +# path: "./" +# +# - name: Checkout Repo +# uses: actions/checkout@v2 +# with: +# path: "./plugins/${{ github.event.repository.name }}" +# +# - name: Setup PHP +# uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 +# with: +# php-version: ${{ matrix.php }} +# install-path: "./bin" +# +# - name: Install Composer +# run: curl -sS https://getcomposer.org/installer | php +# +# - name: Restore Composer package cache +# uses: actions/cache@v2 +# with: +# path: | +# ~/.cache/composer/files +# ~/.cache/composer/vcs +# key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}" +# restore-keys: | +# composer-v2-cache- +# +# - name: Install Composer dependencies +# run: php composer.phar install --prefer-dist --no-interaction +# +# - name: Run PHPUnit tests +# run: ./vendor/bin/phpunit --bootstrap vendor/autoload.php --fail-on-warning ./plugins/${{ github.event.repository.name }}/tests/phpunit integration: name: Integration tests From 4441eafedac1bcabe18642116c429d52b730dd72 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Thu, 11 Nov 2021 17:44:05 -0500 Subject: [PATCH 14/32] fixed integration test path --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8073a146..10204c61 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -171,7 +171,7 @@ jobs: run: php composer.phar install --no-dev --prefer-dist --no-interaction - name: Run integration tests - run: ./plugins/${{ github.event.repository.name }}/integration-action.sh -t4 + run: ./plugins/${{ github.event.repository.name }}/tests/integration-action.sh -t4 codestyle: name: Code Style checks From 8a3be6e3a6c67333715ae770f561d6b1db882fdf Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Thu, 11 Nov 2021 17:47:37 -0500 Subject: [PATCH 15/32] why is my bash script not executable? --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 10204c61..cd72d455 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -171,7 +171,7 @@ jobs: run: php composer.phar install --no-dev --prefer-dist --no-interaction - name: Run integration tests - run: ./plugins/${{ github.event.repository.name }}/tests/integration-action.sh -t4 + run: chmod +x ./plugins/${{ github.event.repository.name }}/tests/integration-action.sh && ./plugins/${{ github.event.repository.name }}/tests/integration-action.sh -t4 codestyle: name: Code Style checks From 0f11ec2d9bcf47265e175223feee915e15b88a41 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Thu, 11 Nov 2021 17:48:19 -0500 Subject: [PATCH 16/32] delete path that doesn't exist --- tests/phpstan.neon.dist | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/phpstan.neon.dist b/tests/phpstan.neon.dist index 0293b28d..11560e03 100644 --- a/tests/phpstan.neon.dist +++ b/tests/phpstan.neon.dist @@ -28,7 +28,6 @@ parameters: - tests/phpunit - tests/plugins/TesterPlugin - plugins - - virions excludePaths: analyseAndScan: - build/php From 31758c9e388abc289f507bf10a6cf79cde62cead Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Thu, 11 Nov 2021 19:49:55 -0500 Subject: [PATCH 17/32] remove old testing methods --- .travis.pmcommands.txt | 5 --- .travis.yml | 44 ----------------------- tests/PluginChecker.phar | Bin 4869 -> 0 bytes tests/lint.sh | 35 ------------------- tests/travisPluginTest.php | 69 ------------------------------------- tests/travisScript.sh | 49 -------------------------- 6 files changed, 202 deletions(-) delete mode 100644 .travis.pmcommands.txt delete mode 100644 .travis.yml delete mode 100644 tests/PluginChecker.phar delete mode 100644 tests/lint.sh delete mode 100644 tests/travisPluginTest.php delete mode 100644 tests/travisScript.sh diff --git a/.travis.pmcommands.txt b/.travis.pmcommands.txt deleted file mode 100644 index 4251ecdc..00000000 --- a/.travis.pmcommands.txt +++ /dev/null @@ -1,5 +0,0 @@ -version -check-plugins -p help -p gen Plots -stop \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e74a75bc..00000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -language: php -php: - - 7.3 -sudo: false - -before_script: - # - pecl install channel://pecl.php.net/pthreads-3.1.6 - - echo | pecl install channel://pecl.php.net/yaml-2.0.4 - - git clone https://github.com/pmmp/pthreads.git - - cd pthreads - - git checkout 1b7da492b944146fa9680f6399bd9c6c6c6095e0 - - phpize - - ./configure - - make - - make install - - cd .. - - echo "extension=pthreads.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - mkdir ${TRAVIS_BUILD_DIR}/../PocketMine - - cd ${TRAVIS_BUILD_DIR}/../PocketMine - - wget -O PocketMine-MP.phar "${1:-"https://jenkins.pmmp.io/job/PocketMine-MP/Stable/artifact/PocketMine-MP.phar"}" - - mkdir plugins - - cp ${TRAVIS_BUILD_DIR}/tests/PluginChecker.phar plugins/PluginChecker.phar - - mkdir unstaged - - php ${TRAVIS_BUILD_DIR}/tests/travisPluginTest.php unstaged - - cd ${TRAVIS_BUILD_DIR} - - chmod 777 ${TRAVIS_BUILD_DIR}/tests/travisScript.sh - - chmod 777 ${TRAVIS_BUILD_DIR}/tests/lint.sh - -script: - - ${TRAVIS_BUILD_DIR}/tests/lint.sh -p php -d ${TRAVIS_BUILD_DIR}/src/MyPlot - - cd ${TRAVIS_BUILD_DIR}/../PocketMine && ls - - ${TRAVIS_BUILD_DIR}/tests/travisScript.sh MyPlot MyPlot - - sed -i 's/world/Plots/' server.properties - - ${TRAVIS_BUILD_DIR}/tests/travisScript.sh MyPlot MyPlot - -deploy: - provider: releases - api_key: $GITHUB_TOKEN - file_glob: true - file: $TRAVIS_BUILD_DIR/../PocketMine/unstaged/MyPlot.phar - skip_cleanup: true - draft: true - on: - tags: true \ No newline at end of file diff --git a/tests/PluginChecker.phar b/tests/PluginChecker.phar deleted file mode 100644 index 0f2f39c86776af70c7c0dbd08770782e3c47ac46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4869 zcmeHK&u<$=6gCJUc_kwu5GM|=ix0aYcI^CWIwmPe+Cr;DwVKdNU0IX$*j}>UUCr#K zjiN}L+7m}ETq|+l4=4x3g+BoaxNwIX7w+)h%x>a!lBO*P5Y)0YyYu6l_uhQ(n`i62 z%keO_gg1=9Zb#m(NH+aY)Hd4?2kF2Mp{<+sp};W-d(C>IK5K0ceFc3#5HRElc7zCF zAVMK|B6^T2KODdnv9}#XfubeNxq1V50^6yWhUP5XNJE%yG?$=xiOtWm`9-KT78(t! zHu16SmSy>UN8C?DsQf7G1`+Rxo@2*DE^XI6u*y|>gk=cDJ?OOY+39w#UEjFc?Yb?i z+>fN--q6vrYAXYDPb9p@6YjWxrdM~xJ}j?5b&m(BAiT1UMe6l^sS=0AU8sZ2z{bY$ zRhLW2_nmA3Tn2v>2T@Nr_B7x(?`KC(xVRIdBjrQu(6YMS4_7y~yX!YM+i2u1$8Evo zm5TMn%cat*rBdm2{Jn&~Qt35pIJ?9S6q{#u$Vb9%Db}20cHu;*^CGkNgrxY;+XA!o zA<;9g9C2TF&*5_%4F-PFDF77TXc2C~W8ZFZ)?^1hYZy#C!g|AQ9V)iS?4F24*rUk} zW>eE_Qm68yA19d|*$5iP(_|P)H8veP?};7dC)%kTW0u(-9v1;zK_=NPpEVa|mzEY9 zi%W~GLkpu~NLk+>1-tn6`w;F>`^)r|?;e}5m8S4rNpHsZI#cj ze-YzODAay)`_Yd%igPYXG#c@+M;Mh?3SVTw$=Tos_X>F=l6^r&%G55r&%UU!gRWwNYHA4OBC~qiwX&_{W zPFm0K01E|O-3fdT`f2D9Gojn{qEIC=^%AFW ziup2^(8}d%f+AU4F;FN_$Drjyv)cr46y8ch#}5;zda0BmOtyV*SEE7psm3yjg-lSh zpn$KXZA(ZDz2oYab~Y2WQY$zHgcQ7#>Ar2B z$bOM6EWqj}^~^ja9ZwL_Gnv&{H!a#b!PtojTd1!>o;}S3>3R=Y;`eZj~PG$#sSq~ZNNyo8NSI!M%iS~lta3ErPfsGJ=I z?#G-`g0b=Gwq|wBc&Lh`J~REu1|-U9rilB(OB3N_VK9dPRizJO8Zhgrw5euiwZV5p zFb%pOfGXydDi~ZP+4}b-Dp~c9CMgA8iX@dGpo$7)B=wweBB)h{R#>m)*G^8nF`$AN z9wX*r@H|&YA#K*UB17}kF(&D|1dHPQCNaGn>?oLL5hK|5|nV0KSE;RO7(MI zP8d-z_PFC*ITX0(nC*Xh$1x2$ZM!3CoSv>&C;E!CuNYDDZ)WnY=$WZK=wqcHCc*xx z*T(ZO<+#`|445c6@~F}Utc#5zU-J5cVtJA;R1!Q(IS}2$zhQrEHE|F#%d{0|lb zIZ0pC1LL*+IrYGcLSRy4pQ&0W#rwMofzE@^zIK26_K|(#!5i|c+Ydka@~7|dpLXek Iwav9Z01#>P6951J diff --git a/tests/lint.sh b/tests/lint.sh deleted file mode 100644 index 6e5547f8..00000000 --- a/tests/lint.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -PHP_BINARY="php" -DIR="" -FIND="find" - -while getopts "p:d:f:" OPTION 2> /dev/null; do - case ${OPTION} in - p) - PHP_BINARY="$OPTARG" - ;; - d) - DIR="$OPTARG" - ;; - f) - FIND="$OPTARG" - ;; - esac -done - -if [ "$DIR" == "" ]; then - echo No directory specified - exit 1 -fi - -echo Running PHP lint scans on \"$DIR\"... - -OUTPUT=`$FIND "$DIR" -name "*.php" -print0 | xargs -0 -n1 -P4 "$PHP_BINARY" -l` - -if [ $? -ne 0 ]; then - echo $OUTPUT | grep -v "No syntax errors" - exit 1 -fi - -echo Lint scan completed successfully. diff --git a/tests/travisPluginTest.php b/tests/travisPluginTest.php deleted file mode 100644 index 75ac185b..00000000 --- a/tests/travisPluginTest.php +++ /dev/null @@ -1,69 +0,0 @@ -\n"; -} -list($owner, $repo) = explode("/", getenv("TRAVIS_REPO_SLUG"), 2); -$sha = getenv("TRAVIS_COMMIT"); -$lastBuild = microtime(true); -for($i = 1; true; $i++) { - echo "Attempting to download CI build from Poggit (trial #$i)\n"; - $json = shell_exec("curl " . escapeshellarg("https://poggit.pmmp.io/ci.info?owner=$owner&repo=$repo&sha=$sha")); - $data = json_decode($json); - if($data === null) { - var_dump($json); - exit(1); - } - if(count($data) === 0) { - if(microtime(true) - $lastBuild > 120) { - if(isset($moreBuilds)) { - echo "[!] No new builds downloaded in two minutes! Supposedly, there should be $moreBuilds more builds to download. Poggit probably encountered build errors.\n"; - echo "[!] Prematurely stopped waiting for further Poggit builds. Progressing to testing...\n"; - exit(0); - } else { - echo "[!] No builds downloaded in two minutes! There is either no builds in this commit, or Poggit had build errors.\n"; - echo "[!] Prematurely stopped waiting for further Poggit builds. Nothing to test in this Travis build...\n"; - exit(1); - } - } - sleep(5); - echo "[*] Waiting for Poggit builds...\n"; - continue; - } - $moreBuilds = PHP_INT_MAX; - foreach($data as $datum) { - shell_exec("wget -O " . escapeshellarg($name = $target . $datum->projectName . ".phar") . " " . - escapeshellarg("https://poggit.pmmp.io/r/" . $datum->resourceId)); - echo "[*] Downloaded Poggit build for project: $name\n"; - $moreBuilds = min($moreBuilds, $datum->buildsAfterThis); - } - if($moreBuilds > 0) { - echo "[*] $moreBuilds more builds to download...\n"; - $lastBuild = microtime(true); - continue; - } else { - exit(0); - } -} diff --git a/tests/travisScript.sh b/tests/travisScript.sh deleted file mode 100644 index 2d12f70e..00000000 --- a/tests/travisScript.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -if [ "$1" == "" ]; then - echo Usage: travisScript.sh ' ' - exit 2 -fi -PLUGIN_NAME="$1" -cd "$TRAVIS_BUILD_DIR"/../PocketMine - -if [ "$2" == "" ]; then - PROJECT_NAME="$1" -else - PROJECT_NAME="$2" -fi - -echo Staging "$PROJECT_NAME".phar -cp unstaged/"$PROJECT_NAME".phar plugins/"$PROJECT_NAME".phar || (echo "Project $PROJECT_NAME is not built in this commit" && exit 0) - -echo Loading .travis.pmcommands.txt -pmcommands_file="$TRAVIS_BUILD_DIR"/.travis.pmcommands.txt -if [ ! -f "$pmcommands_file" ]; then - echo version >> "$pmcommands_file" - echo check-plugins >> "$pmcommands_file" -fi -egrep "^stop\$" "$pmcommands_file" || (echo stop >> "$pmcommands_file" && echo >> "$pmcommands_file") - -cmds_to_run="$(cat "$pmcommands_file")" -echo Running the following commands: -echo === -echo "$cmds_to_run" -echo === - -echo Server plugins directory: -ls plugins/*.phar -php PocketMine-MP.phar --no-wizard --enable-ansi --settings.asyncworker=2 --debug.level=2 --debug.commands=true --disable-readline --settings.enable-dev-builds=1 --pluginchecker.target="$PLUGIN_NAME" < "$pmcommands_file" | tee stdout.log - -rm plugins/"$PROJECT_NAME".phar - -if grep "PluginChecker passed" stdout.log >/dev/null; then - if grep "PluginChecker disabled fluently" stdout.log >/dev/null; then - echo Test passed - exit 0 - else - echo Server did not shutdown normally - exit 1 - fi -else - echo Plugin could not be loaded - exit 1 -fi From 2535ec3e2f3dac42fef8292a830e304749b6f55b Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Thu, 11 Nov 2021 19:50:34 -0500 Subject: [PATCH 18/32] Added security and contribution info --- CONTRIBUTING.md | 101 ++++++++++++++++++++++++++++++++++++++++++++++++ SECURITY.md | 25 ++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 SECURITY.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..0168a114 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,101 @@ +# MyPlot Contribution Guidelines + +MyPlot is an open source project, and contributions from the community are welcomed, as long as they comply with the quality standards and licensing. + +Code contributions must be submitted using [GitHub Pull Requests](https://github.com/jasonwynn10/MyPlot/pulls), where they will be reviewed by maintainers. + +Small contributions (e.g. minor bug fixes) can be submitted as pull requests directly. + +Larger contributions like feature additions should be preceded by a [Change Proposal](#rfcs--change-proposals) to allow maintainers and other people to discuss and decide if it's a good idea or not. + +## Useful documentation from github.com +- [About pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) +- [About forks](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/about-forks) +- [Creating a pull request from a fork](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) + +## Other things you'll need +- [git](https://git-scm.com/) + +## Making a pull request +The basic procedure to create a pull request is: +1. [Fork the repository on GitHub](https://github.com/jasonwynn10/MyPlot/fork). This gives you your own copy of the repository to make changes to. +2. Create a branch on your fork for your changes. +3. Make the changes you want to make on this branch. +4. You can then make a [pull request](https://github.com/jasonwynn10/MyPlot/pull/new) to the project. + +## Pull request reviews +Pull requests will be reviewed by maintainers when they are available. +Note that there might be a long wait time before a reviewer looks at your PR. + +Depending on the changes, maintainers might ask you to make changes to the PR to fix problems or to improve the code. +**Do not delete your fork** while your pull request remains open, otherwise you won't be able to make any requested changes and the PR will end up being declined. + +### Requirements +The following are required as a minimum for pull requests. PRs that don't meet these requirements will be declined unless updated to meet them. + +#### Licensing +MyPlot is licensed under [MIT license](LICENSE). +By proposing a pull request, you agree to your code being distributed within MyPlot under the same license. +If you take code from other projects, that code MUST be licensed under an MIT-compatible license. + +#### PRs should be about exactly ONE thing +If you want to make multiple changes, those changes should each be contributed as separate pull requests. **DO NOT** mix unrelated changes. + +#### PRs must not include unnecessary/unrelated changes +Do not include changes which aren't strictly necessary. This makes it harder to review a PR, because the code diff becomes larger and harder to review. +This means: +- don't reformat or rearrange existing code +- don't change things that aren't related to the PR's objective +- don't rewrite existing code just to make it "look nicer" +- don't change PhpDocs to native types in code you didn't write + +#### Tests must be provided +Where possible, PHPUnit tests should be written for new or changed code. +If that's not possible (e.g. for in-game functionality), the code must be tested manually and details of the tests done must be provided. +**Simply saying "Tested" is not acceptable** and will lead to your PR being declined. + +#### Comments and documentation must be written in American English +English is the shared languages of all current maintainers. + +#### Code must be in the MyPlot style +It's your responsibility to ensure your code matches the formatting and styling of the rest of the code. +If you use PhpStorm, a `Project` code style is provided, which you can use to automatically format new code. +You can also use [`php-cs-fixer`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) to format your code. + +### Recommendations + +- **Do not edit code directly on github.com.** I recommend learning how to use [`git`](https://git-scm.com). `git` allows you to "clone" a repository onto your computer, so that you can make changes using an IDE. +- **Use an IDE, not a text editor.** I recommend PhpStorm or VSCode. +- **Create a new branch on your fork for each pull request.** This allows you to use the same fork to make multiple pull requests at the same time. +- **Use descriptive commit titles.** You can see an example [here](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). +- **Do not include multiple unrelated changes in one commit.** An atomic style for commits is preferred - this means that changes included in a commit should be part of a single distinct change set. See [this link](https://www.freshconsulting.com/atomic-commits/) for more information on atomic commits. See the [documentation on `git add`](https://git-scm.com/docs/git-add) for information on how to isolate local changes for committing. +- **Your pull request will be checked and discussed in due time.** Since the team is scattered all around the world, your PR may not receive any attention for some time. +- **Do not make large pull requests without an RFC.** Large changes should be discussed beforehand using the [RFC / Change Proposal](#rfcs--change-proposals) process. Large changes are much harder to review and are more likely to be declined if maintainers don't have a good idea what you're trying to do in advance. +- **Do not copy-paste code**. There are potential license issues implicit with copy-pasting, and copy-paste usually indicates a lack of understanding of the actual code. Copy-pasted code is obvious a mile off and **any PR like this is likely to be closed**. If you want to use somebody else's code from a Git repository, **use [GIT's cherry-pick feature](https://git-scm.com/docs/git-cherry-pick)** to cherry-pick the commit. + + +**Thanks for contributing to MyPlot!** + +## RFCs / Change Proposals +Change Proposals are issues or discussions which describe a new feature proposal or behavioural change. +They are used to get feedback from maintainers and the community about an idea for a change, to decide whether or not it's a good idea. + +### Submitting an RFC +RFCs should be submitted using Issues or Discussions. +RFCs _can_ be submitted as pull requests if you've already written the code, but this is not recommended, since it's not guaranteed that an RFC will pass, in which case your effort would be wasted. + +RFCs should include the following: +- A summary of what you want to change +- Why you want to change it (e.g. what problems it solves) +- Alternative methods you've considered to solve the problem. This should include any possible ways that what you want can be done without the change. + +### Voting on RFCs +Community members can vote on RFCs. This gives maintainers an idea of how popular the idea is. +Votes can be cast using :+1: and :-1: reactions. + +**Please don't downvote without providing a reason why!** + +### Implementing RFCs +Anyone can write the code to implement an RFC, and submit a pull request for it. It doesn't have to be the RFC author. + +Implementations should be submitted as pull requests. The pull request description must include a link to the RFC. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..3177ebc5 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,25 @@ +# Security Policy + +## Reporting a Vulnerability + +**DO NOT report vulnerabilities on the GitHub issue tracker.** +GitHub is public and anyone can see the issues you post on the issue tracker, including people who would exploit vulnerabilities for their own gain. + +**WARNING: You may put live servers at risk by reporting a vulnerability on the GitHub issue tracker.** + +**Contact me** by sending an email to [**jasonwynn10@me.com**](mailto:jasonwynn10@me.com?subject=Security%20Vulnerability%20in%20MyPlot). Include the following information: + +- Version of MyPlot +- Detailed description of the vulnerability (e.g. how to exploit it, what the effects are) + +Please note that I can't guarantee a reply to every email. + +## FAQ +### Do you offer a bug bounty? +No. + +### How soon can I expect a fix for a vulnerability I've reported? +This depends on the nature of the problem. I can't provide any general ETA (nor would it be wise to provide one). +In general, it depends on when I have time to look into the problem, how complex the problem is to fix, and how many users it impacts. + +When a fix for a severe vulnerability is pushed, a patch release for the target version will usually be released within 24 hours so that users can update. From bb331e3beb70c2b50e10b54d9a0d935233298abf Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 16:29:37 -0500 Subject: [PATCH 19/32] Generated phpstan baseline --- phpstan.neon.dist | 387 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 386 insertions(+), 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index d9d523da..3370193f 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -6,4 +6,389 @@ parameters: - /source/src - /deps bootstrapFiles: - - phar:///pocketmine/PocketMine-MP.phar/vendor/autoload.php \ No newline at end of file + - phar:///pocketmine/PocketMine-MP.phar/vendor/autoload.php + ignoreErrors: + - + message: "#^Only booleans are allowed in &&, mixed given on the right side\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/Commands.php + + - + message: "#^Cannot call method isSame\\(\\) on MyPlot\\\\Plot\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/EventListener.php + + - + message: "#^Anonymous function uses \\$this assigned to variable \\$plugin\\. Use \\$this directly in the function body\\.$#" + count: 8 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to method getSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" + count: 7 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to method removeSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" + count: 7 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to method setPosition\\(\\) on an unknown class muqsit\\\\worldstyler\\\\Selection\\.$#" + count: 12 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\CommonShape\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\Cuboid\\.$#" + count: 7 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Cannot call method setChunk\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Class muqsit\\\\worldstyler\\\\WorldStyler not found\\.$#" + count: 3 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Class onebone\\\\economyapi\\\\EconomyAPI not found\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Instantiated class muqsit\\\\worldstyler\\\\Selection not found\\.$#" + count: 5 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Method MyPlot\\\\MyPlot\\:\\:getPlotChunks\\(\\) should return array\\ but returns array\\\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Only booleans are allowed in &&, mixed given on the left side\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Only booleans are allowed in an if condition, mixed given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^For loop initial assignment overwrites variable \\$X\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php + + - + message: "#^For loop initial assignment overwrites variable \\$x\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php + + - + message: "#^For loop initial assignment overwrites variable \\$z\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php + + - + message: "#^Method MyPlot\\\\forms\\\\ComplexMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/forms/ComplexMyPlotForm.php + + - + message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onClose with no signature specified for Closure\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php + + - + message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php + + - + message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/forms/subforms/RemoveHelperForm.php + + - + message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/forms/subforms/UndenyPlayerForm.php + + - + message: "#^Method MyPlot\\\\provider\\\\DataProvider\\:\\:findEmptyPlotSquared\\(\\) has parameter \\$plots with no value type specified in iterable type array\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/DataProvider.php + + - + message: "#^Access to constant RET_SUCCESS on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Call to method addMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Call to method getLogger\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 4 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Call to method reduceMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Parameter \\$plugin of method MyPlot\\\\provider\\\\EconomySProvider\\:\\:__construct\\(\\) has invalid type onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Property MyPlot\\\\provider\\\\EconomySProvider\\:\\:\\$plugin has unknown class onebone\\\\economyapi\\\\EconomyAPI as its type\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Offset 0 does not exist on array\\|null\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php + + - + message: "#^Only booleans are allowed in &&, array\\|null given on the right side\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php + + - + message: "#^Only booleans are allowed in &&, array\\|false given on the right side\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php + + - + message: "#^Only booleans are allowed in an if condition, array\\|false given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AddHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/AddHelperSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AutoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/AutoSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BiomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/BiomeSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BuySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/BuySubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClaimSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ClaimSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClearSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ClearSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\CloneSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/CloneSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DenyPlayerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/DenyPlayerSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DisposeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/DisposeSubCommand.php + + - + message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$player of class MyPlot\\\\forms\\\\subforms\\\\FillForm constructor expects pocketmine\\\\Player, pocketmine\\\\Player\\|null given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$position of method MyPlot\\\\MyPlot\\:\\:getPlotByPosition\\(\\) expects pocketmine\\\\level\\\\Position, pocketmine\\\\Player\\|null given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\FillSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\GiveSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/GiveSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/HomeSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomesSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/HomesSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\InfoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/InfoSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\KickSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/KickSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ListSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ListSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MergeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/MergeSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MiddleSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/MiddleSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\NameSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/NameSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\PvpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/PvpSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\RemoveHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/RemoveHelperSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ResetSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ResetSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SellSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/SellSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SetOwnerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/SetOwnerSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\UnDenySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/UnDenySubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\WarpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/WarpSubCommand.php + + - + message: "#^Cannot call method isVectorInXZ\\(\\) on pocketmine\\\\math\\\\AxisAlignedBB\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/ClearPlotTask.php + + - + message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot access property \\$x on pocketmine\\\\level\\\\Position\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot access property \\$z on pocketmine\\\\level\\\\Position\\|null\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method getTiles\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/RoadFillTask.php \ No newline at end of file From 1a04295e11f5ae4e4c09806b7b406974b08945f7 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 16:33:51 -0500 Subject: [PATCH 20/32] baseline was in wrong place... --- tests/phpstan.neon.dist | 385 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 385 insertions(+) diff --git a/tests/phpstan.neon.dist b/tests/phpstan.neon.dist index 11560e03..b3f1a466 100644 --- a/tests/phpstan.neon.dist +++ b/tests/phpstan.neon.dist @@ -51,3 +51,388 @@ parameters: #we'll just fill it with 10 - it's very unlikely to encounter a callable with 10 parameters anyway. anyCallable: 'callable(never, never, never, never, never, never, never, never, never, never) : mixed' anyClosure: '\Closure(never, never, never, never, never, never, never, never, never, never) : mixed' + ignoreErrors: + - + message: "#^Only booleans are allowed in &&, mixed given on the right side\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/Commands.php + + - + message: "#^Cannot call method isSame\\(\\) on MyPlot\\\\Plot\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/EventListener.php + + - + message: "#^Anonymous function uses \\$this assigned to variable \\$plugin\\. Use \\$this directly in the function body\\.$#" + count: 8 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to method getSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" + count: 7 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to method removeSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" + count: 7 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to method setPosition\\(\\) on an unknown class muqsit\\\\worldstyler\\\\Selection\\.$#" + count: 12 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\CommonShape\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\Cuboid\\.$#" + count: 7 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Cannot call method setChunk\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Class muqsit\\\\worldstyler\\\\WorldStyler not found\\.$#" + count: 3 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Class onebone\\\\economyapi\\\\EconomyAPI not found\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Instantiated class muqsit\\\\worldstyler\\\\Selection not found\\.$#" + count: 5 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Method MyPlot\\\\MyPlot\\:\\:getPlotChunks\\(\\) should return array\\ but returns array\\\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Only booleans are allowed in &&, mixed given on the left side\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Only booleans are allowed in an if condition, mixed given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^For loop initial assignment overwrites variable \\$X\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php + + - + message: "#^For loop initial assignment overwrites variable \\$x\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php + + - + message: "#^For loop initial assignment overwrites variable \\$z\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php + + - + message: "#^Method MyPlot\\\\forms\\\\ComplexMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/forms/ComplexMyPlotForm.php + + - + message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onClose with no signature specified for Closure\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php + + - + message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php + + - + message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/forms/subforms/RemoveHelperForm.php + + - + message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/forms/subforms/UndenyPlayerForm.php + + - + message: "#^Method MyPlot\\\\provider\\\\DataProvider\\:\\:findEmptyPlotSquared\\(\\) has parameter \\$plots with no value type specified in iterable type array\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/DataProvider.php + + - + message: "#^Access to constant RET_SUCCESS on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Call to method addMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Call to method getLogger\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 4 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Call to method reduceMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Parameter \\$plugin of method MyPlot\\\\provider\\\\EconomySProvider\\:\\:__construct\\(\\) has invalid type onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Property MyPlot\\\\provider\\\\EconomySProvider\\:\\:\\$plugin has unknown class onebone\\\\economyapi\\\\EconomyAPI as its type\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Offset 0 does not exist on array\\|null\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php + + - + message: "#^Only booleans are allowed in &&, array\\|null given on the right side\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php + + - + message: "#^Only booleans are allowed in &&, array\\|false given on the right side\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php + + - + message: "#^Only booleans are allowed in an if condition, array\\|false given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AddHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/AddHelperSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AutoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/AutoSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BiomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/BiomeSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BuySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/BuySubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClaimSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ClaimSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClearSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ClearSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\CloneSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/CloneSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DenyPlayerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/DenyPlayerSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DisposeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/DisposeSubCommand.php + + - + message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$player of class MyPlot\\\\forms\\\\subforms\\\\FillForm constructor expects pocketmine\\\\Player, pocketmine\\\\Player\\|null given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$position of method MyPlot\\\\MyPlot\\:\\:getPlotByPosition\\(\\) expects pocketmine\\\\level\\\\Position, pocketmine\\\\Player\\|null given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\FillSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\GiveSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/GiveSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/HomeSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomesSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/HomesSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\InfoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/InfoSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\KickSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/KickSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ListSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ListSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MergeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/MergeSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MiddleSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/MiddleSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\NameSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/NameSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\PvpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/PvpSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\RemoveHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/RemoveHelperSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ResetSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ResetSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SellSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/SellSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SetOwnerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/SetOwnerSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\UnDenySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/UnDenySubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\WarpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/WarpSubCommand.php + + - + message: "#^Cannot call method isVectorInXZ\\(\\) on pocketmine\\\\math\\\\AxisAlignedBB\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/ClearPlotTask.php + + - + message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot access property \\$x on pocketmine\\\\level\\\\Position\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot access property \\$z on pocketmine\\\\level\\\\Position\\|null\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method getTiles\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/RoadFillTask.php \ No newline at end of file From 202fd65b6062b5227bdc620e36f8e49e8360cf2c Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 16:36:04 -0500 Subject: [PATCH 21/32] phpstorm can you not make tabs spaces pls --- tests/phpstan.neon.dist | 768 ++++++++++++++++++++-------------------- 1 file changed, 384 insertions(+), 384 deletions(-) diff --git a/tests/phpstan.neon.dist b/tests/phpstan.neon.dist index b3f1a466..e0b2b8e2 100644 --- a/tests/phpstan.neon.dist +++ b/tests/phpstan.neon.dist @@ -52,387 +52,387 @@ parameters: anyCallable: 'callable(never, never, never, never, never, never, never, never, never, never) : mixed' anyClosure: '\Closure(never, never, never, never, never, never, never, never, never, never) : mixed' ignoreErrors: - - - message: "#^Only booleans are allowed in &&, mixed given on the right side\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/Commands.php - - - - message: "#^Cannot call method isSame\\(\\) on MyPlot\\\\Plot\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/EventListener.php - - - - message: "#^Anonymous function uses \\$this assigned to variable \\$plugin\\. Use \\$this directly in the function body\\.$#" - count: 8 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to method getSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" - count: 7 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to method removeSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" - count: 7 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to method setPosition\\(\\) on an unknown class muqsit\\\\worldstyler\\\\Selection\\.$#" - count: 12 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\CommonShape\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\Cuboid\\.$#" - count: 7 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Cannot call method setChunk\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Class muqsit\\\\worldstyler\\\\WorldStyler not found\\.$#" - count: 3 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Class onebone\\\\economyapi\\\\EconomyAPI not found\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Instantiated class muqsit\\\\worldstyler\\\\Selection not found\\.$#" - count: 5 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Method MyPlot\\\\MyPlot\\:\\:getPlotChunks\\(\\) should return array\\ but returns array\\\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Only booleans are allowed in &&, mixed given on the left side\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Only booleans are allowed in an if condition, mixed given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^For loop initial assignment overwrites variable \\$X\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php - - - - message: "#^For loop initial assignment overwrites variable \\$x\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php - - - - message: "#^For loop initial assignment overwrites variable \\$z\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php - - - - message: "#^Method MyPlot\\\\forms\\\\ComplexMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/forms/ComplexMyPlotForm.php - - - - message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onClose with no signature specified for Closure\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php - - - - message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php - - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/forms/subforms/RemoveHelperForm.php - - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/forms/subforms/UndenyPlayerForm.php - - - - message: "#^Method MyPlot\\\\provider\\\\DataProvider\\:\\:findEmptyPlotSquared\\(\\) has parameter \\$plots with no value type specified in iterable type array\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/DataProvider.php - - - - message: "#^Access to constant RET_SUCCESS on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Call to method addMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Call to method getLogger\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 4 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Call to method reduceMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Parameter \\$plugin of method MyPlot\\\\provider\\\\EconomySProvider\\:\\:__construct\\(\\) has invalid type onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Property MyPlot\\\\provider\\\\EconomySProvider\\:\\:\\$plugin has unknown class onebone\\\\economyapi\\\\EconomyAPI as its type\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Offset 0 does not exist on array\\|null\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php - - - - message: "#^Only booleans are allowed in &&, array\\|null given on the right side\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php - - - - message: "#^Only booleans are allowed in &&, array\\|false given on the right side\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php - - - - message: "#^Only booleans are allowed in an if condition, array\\|false given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AddHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/AddHelperSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AutoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/AutoSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BiomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/BiomeSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BuySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/BuySubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClaimSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/ClaimSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClearSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/ClearSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\CloneSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/CloneSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DenyPlayerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/DenyPlayerSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DisposeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/DisposeSubCommand.php - - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$player of class MyPlot\\\\forms\\\\subforms\\\\FillForm constructor expects pocketmine\\\\Player, pocketmine\\\\Player\\|null given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$position of method MyPlot\\\\MyPlot\\:\\:getPlotByPosition\\(\\) expects pocketmine\\\\level\\\\Position, pocketmine\\\\Player\\|null given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\FillSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\GiveSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/GiveSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/HomeSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomesSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/HomesSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\InfoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/InfoSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\KickSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/KickSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ListSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/ListSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MergeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/MergeSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MiddleSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/MiddleSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\NameSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/NameSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\PvpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/PvpSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\RemoveHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/RemoveHelperSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ResetSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/ResetSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SellSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/SellSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SetOwnerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/SetOwnerSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\UnDenySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/UnDenySubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\WarpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/WarpSubCommand.php - - - - message: "#^Cannot call method isVectorInXZ\\(\\) on pocketmine\\\\math\\\\AxisAlignedBB\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/ClearPlotTask.php - - - - message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot access property \\$x on pocketmine\\\\level\\\\Position\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot access property \\$z on pocketmine\\\\level\\\\Position\\|null\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method getTiles\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/RoadFillTask.php \ No newline at end of file + - + message: "#^Only booleans are allowed in &&, mixed given on the right side\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/Commands.php + + - + message: "#^Cannot call method isSame\\(\\) on MyPlot\\\\Plot\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/EventListener.php + + - + message: "#^Anonymous function uses \\$this assigned to variable \\$plugin\\. Use \\$this directly in the function body\\.$#" + count: 8 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to method getSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" + count: 7 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to method removeSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" + count: 7 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to method setPosition\\(\\) on an unknown class muqsit\\\\worldstyler\\\\Selection\\.$#" + count: 12 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\CommonShape\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\Cuboid\\.$#" + count: 7 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Cannot call method setChunk\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Class muqsit\\\\worldstyler\\\\WorldStyler not found\\.$#" + count: 3 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Class onebone\\\\economyapi\\\\EconomyAPI not found\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Instantiated class muqsit\\\\worldstyler\\\\Selection not found\\.$#" + count: 5 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Method MyPlot\\\\MyPlot\\:\\:getPlotChunks\\(\\) should return array\\ but returns array\\\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Only booleans are allowed in &&, mixed given on the left side\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Only booleans are allowed in an if condition, mixed given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^For loop initial assignment overwrites variable \\$X\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php + + - + message: "#^For loop initial assignment overwrites variable \\$x\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php + + - + message: "#^For loop initial assignment overwrites variable \\$z\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php + + - + message: "#^Method MyPlot\\\\forms\\\\ComplexMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/forms/ComplexMyPlotForm.php + + - + message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onClose with no signature specified for Closure\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php + + - + message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php + + - + message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/forms/subforms/RemoveHelperForm.php + + - + message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/forms/subforms/UndenyPlayerForm.php + + - + message: "#^Method MyPlot\\\\provider\\\\DataProvider\\:\\:findEmptyPlotSquared\\(\\) has parameter \\$plots with no value type specified in iterable type array\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/DataProvider.php + + - + message: "#^Access to constant RET_SUCCESS on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Call to method addMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Call to method getLogger\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 4 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Call to method reduceMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Parameter \\$plugin of method MyPlot\\\\provider\\\\EconomySProvider\\:\\:__construct\\(\\) has invalid type onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Property MyPlot\\\\provider\\\\EconomySProvider\\:\\:\\$plugin has unknown class onebone\\\\economyapi\\\\EconomyAPI as its type\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Offset 0 does not exist on array\\|null\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php + + - + message: "#^Only booleans are allowed in &&, array\\|null given on the right side\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php + + - + message: "#^Only booleans are allowed in &&, array\\|false given on the right side\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php + + - + message: "#^Only booleans are allowed in an if condition, array\\|false given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AddHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/AddHelperSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AutoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/AutoSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BiomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/BiomeSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BuySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/BuySubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClaimSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ClaimSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClearSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ClearSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\CloneSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/CloneSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DenyPlayerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/DenyPlayerSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DisposeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/DisposeSubCommand.php + + - + message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$player of class MyPlot\\\\forms\\\\subforms\\\\FillForm constructor expects pocketmine\\\\Player, pocketmine\\\\Player\\|null given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$position of method MyPlot\\\\MyPlot\\:\\:getPlotByPosition\\(\\) expects pocketmine\\\\level\\\\Position, pocketmine\\\\Player\\|null given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\FillSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\GiveSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/GiveSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/HomeSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomesSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/HomesSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\InfoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/InfoSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\KickSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/KickSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ListSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ListSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MergeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/MergeSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MiddleSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/MiddleSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\NameSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/NameSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\PvpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/PvpSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\RemoveHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/RemoveHelperSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ResetSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ResetSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SellSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/SellSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SetOwnerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/SetOwnerSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\UnDenySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/UnDenySubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\WarpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/WarpSubCommand.php + + - + message: "#^Cannot call method isVectorInXZ\\(\\) on pocketmine\\\\math\\\\AxisAlignedBB\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/ClearPlotTask.php + + - + message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot access property \\$x on pocketmine\\\\level\\\\Position\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot access property \\$z on pocketmine\\\\level\\\\Position\\|null\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method getTiles\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/RoadFillTask.php \ No newline at end of file From 6bf8a0c788ad8bad0724151ca33168b5d43f1ad4 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 16:40:13 -0500 Subject: [PATCH 22/32] baseline can be its own file --- tests/phpstan-baseline.neon | 387 +++++++++++++++++++++++++++++++++++ tests/phpstan.neon.dist | 388 +----------------------------------- 2 files changed, 389 insertions(+), 386 deletions(-) create mode 100644 tests/phpstan-baseline.neon diff --git a/tests/phpstan-baseline.neon b/tests/phpstan-baseline.neon new file mode 100644 index 00000000..8c64c873 --- /dev/null +++ b/tests/phpstan-baseline.neon @@ -0,0 +1,387 @@ +parameters: + ignoreErrors: + - + message: "#^Only booleans are allowed in &&, mixed given on the right side\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/Commands.php + + - + message: "#^Cannot call method isSame\\(\\) on MyPlot\\\\Plot\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/EventListener.php + + - + message: "#^Anonymous function uses \\$this assigned to variable \\$plugin\\. Use \\$this directly in the function body\\.$#" + count: 8 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to method getSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" + count: 7 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to method removeSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" + count: 7 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to method setPosition\\(\\) on an unknown class muqsit\\\\worldstyler\\\\Selection\\.$#" + count: 12 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\CommonShape\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\Cuboid\\.$#" + count: 7 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Cannot call method setChunk\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Class muqsit\\\\worldstyler\\\\WorldStyler not found\\.$#" + count: 3 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Class onebone\\\\economyapi\\\\EconomyAPI not found\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Instantiated class muqsit\\\\worldstyler\\\\Selection not found\\.$#" + count: 5 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Method MyPlot\\\\MyPlot\\:\\:getPlotChunks\\(\\) should return array\\ but returns array\\\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Only booleans are allowed in &&, mixed given on the left side\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Only booleans are allowed in an if condition, mixed given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlot.php + + - + message: "#^For loop initial assignment overwrites variable \\$X\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php + + - + message: "#^For loop initial assignment overwrites variable \\$x\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php + + - + message: "#^For loop initial assignment overwrites variable \\$z\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php + + - + message: "#^Method MyPlot\\\\forms\\\\ComplexMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/forms/ComplexMyPlotForm.php + + - + message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onClose with no signature specified for Closure\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php + + - + message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php + + - + message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/forms/subforms/RemoveHelperForm.php + + - + message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/forms/subforms/UndenyPlayerForm.php + + - + message: "#^Method MyPlot\\\\provider\\\\DataProvider\\:\\:findEmptyPlotSquared\\(\\) has parameter \\$plots with no value type specified in iterable type array\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/DataProvider.php + + - + message: "#^Access to constant RET_SUCCESS on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Call to method addMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Call to method getLogger\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 4 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Call to method reduceMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Parameter \\$plugin of method MyPlot\\\\provider\\\\EconomySProvider\\:\\:__construct\\(\\) has invalid type onebone\\\\economyapi\\\\EconomyAPI\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Property MyPlot\\\\provider\\\\EconomySProvider\\:\\:\\$plugin has unknown class onebone\\\\economyapi\\\\EconomyAPI as its type\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php + + - + message: "#^Offset 0 does not exist on array\\|null\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php + + - + message: "#^Only booleans are allowed in &&, array\\|null given on the right side\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php + + - + message: "#^Only booleans are allowed in &&, array\\|false given on the right side\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php + + - + message: "#^Only booleans are allowed in an if condition, array\\|false given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AddHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/AddHelperSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AutoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/AutoSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BiomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/BiomeSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BuySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/BuySubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClaimSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ClaimSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClearSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ClearSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\CloneSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/CloneSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DenyPlayerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/DenyPlayerSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DisposeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/DisposeSubCommand.php + + - + message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$player of class MyPlot\\\\forms\\\\subforms\\\\FillForm constructor expects pocketmine\\\\Player, pocketmine\\\\Player\\|null given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$position of method MyPlot\\\\MyPlot\\:\\:getPlotByPosition\\(\\) expects pocketmine\\\\level\\\\Position, pocketmine\\\\Player\\|null given\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\FillSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\GiveSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/GiveSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/HomeSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomesSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/HomesSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\InfoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/InfoSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\KickSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/KickSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ListSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ListSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MergeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/MergeSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MiddleSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/MiddleSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\NameSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/NameSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\PvpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/PvpSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\RemoveHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/RemoveHelperSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ResetSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/ResetSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SellSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/SellSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SetOwnerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/SetOwnerSubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\UnDenySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/UnDenySubCommand.php + + - + message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\WarpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/subcommand/WarpSubCommand.php + + - + message: "#^Cannot call method isVectorInXZ\\(\\) on pocketmine\\\\math\\\\AxisAlignedBB\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/ClearPlotTask.php + + - + message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php + + - + message: "#^Cannot access property \\$x on pocketmine\\\\level\\\\Position\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot access property \\$z on pocketmine\\\\level\\\\Position\\|null\\.$#" + count: 2 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method getTiles\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php + + - + message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" + count: 1 + path: plugins/MyPlot/src/MyPlot/task/RoadFillTask.php + diff --git a/tests/phpstan.neon.dist b/tests/phpstan.neon.dist index e0b2b8e2..c59a95a7 100644 --- a/tests/phpstan.neon.dist +++ b/tests/phpstan.neon.dist @@ -10,6 +10,7 @@ includes: - vendor/phpstan/phpstan-phpunit/extension.neon - vendor/phpstan/phpstan-phpunit/rules.neon - vendor/phpstan/phpstan-strict-rules/rules.neon + - plugins/MyPlot/tests/phpstan-baseline.neon parameters: level: 8 @@ -50,389 +51,4 @@ parameters: #what we actually need is something that accepts an infinite number of parameters, but in the absence of that, #we'll just fill it with 10 - it's very unlikely to encounter a callable with 10 parameters anyway. anyCallable: 'callable(never, never, never, never, never, never, never, never, never, never) : mixed' - anyClosure: '\Closure(never, never, never, never, never, never, never, never, never, never) : mixed' - ignoreErrors: - - - message: "#^Only booleans are allowed in &&, mixed given on the right side\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/Commands.php - - - - message: "#^Cannot call method isSame\\(\\) on MyPlot\\\\Plot\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/EventListener.php - - - - message: "#^Anonymous function uses \\$this assigned to variable \\$plugin\\. Use \\$this directly in the function body\\.$#" - count: 8 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to method getSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" - count: 7 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to method removeSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" - count: 7 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to method setPosition\\(\\) on an unknown class muqsit\\\\worldstyler\\\\Selection\\.$#" - count: 12 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\CommonShape\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\Cuboid\\.$#" - count: 7 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Cannot call method setChunk\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Class muqsit\\\\worldstyler\\\\WorldStyler not found\\.$#" - count: 3 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Class onebone\\\\economyapi\\\\EconomyAPI not found\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Instantiated class muqsit\\\\worldstyler\\\\Selection not found\\.$#" - count: 5 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Method MyPlot\\\\MyPlot\\:\\:getPlotChunks\\(\\) should return array\\ but returns array\\\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Only booleans are allowed in &&, mixed given on the left side\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Only booleans are allowed in an if condition, mixed given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^For loop initial assignment overwrites variable \\$X\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php - - - - message: "#^For loop initial assignment overwrites variable \\$x\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php - - - - message: "#^For loop initial assignment overwrites variable \\$z\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php - - - - message: "#^Method MyPlot\\\\forms\\\\ComplexMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/forms/ComplexMyPlotForm.php - - - - message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onClose with no signature specified for Closure\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php - - - - message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php - - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/forms/subforms/RemoveHelperForm.php - - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/forms/subforms/UndenyPlayerForm.php - - - - message: "#^Method MyPlot\\\\provider\\\\DataProvider\\:\\:findEmptyPlotSquared\\(\\) has parameter \\$plots with no value type specified in iterable type array\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/DataProvider.php - - - - message: "#^Access to constant RET_SUCCESS on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Call to method addMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Call to method getLogger\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 4 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Call to method reduceMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Parameter \\$plugin of method MyPlot\\\\provider\\\\EconomySProvider\\:\\:__construct\\(\\) has invalid type onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Property MyPlot\\\\provider\\\\EconomySProvider\\:\\:\\$plugin has unknown class onebone\\\\economyapi\\\\EconomyAPI as its type\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Offset 0 does not exist on array\\|null\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php - - - - message: "#^Only booleans are allowed in &&, array\\|null given on the right side\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php - - - - message: "#^Only booleans are allowed in &&, array\\|false given on the right side\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php - - - - message: "#^Only booleans are allowed in an if condition, array\\|false given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AddHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/AddHelperSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AutoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/AutoSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BiomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/BiomeSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BuySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/BuySubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClaimSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/ClaimSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClearSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/ClearSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\CloneSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/CloneSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DenyPlayerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/DenyPlayerSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DisposeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/DisposeSubCommand.php - - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$player of class MyPlot\\\\forms\\\\subforms\\\\FillForm constructor expects pocketmine\\\\Player, pocketmine\\\\Player\\|null given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$position of method MyPlot\\\\MyPlot\\:\\:getPlotByPosition\\(\\) expects pocketmine\\\\level\\\\Position, pocketmine\\\\Player\\|null given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\FillSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\GiveSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/GiveSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/HomeSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomesSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/HomesSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\InfoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/InfoSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\KickSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/KickSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ListSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/ListSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MergeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/MergeSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MiddleSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/MiddleSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\NameSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/NameSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\PvpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/PvpSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\RemoveHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/RemoveHelperSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ResetSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/ResetSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SellSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/SellSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SetOwnerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/SetOwnerSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\UnDenySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/UnDenySubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\WarpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/WarpSubCommand.php - - - - message: "#^Cannot call method isVectorInXZ\\(\\) on pocketmine\\\\math\\\\AxisAlignedBB\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/ClearPlotTask.php - - - - message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot access property \\$x on pocketmine\\\\level\\\\Position\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot access property \\$z on pocketmine\\\\level\\\\Position\\|null\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method getTiles\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/RoadFillTask.php \ No newline at end of file + anyClosure: '\Closure(never, never, never, never, never, never, never, never, never, never) : mixed' \ No newline at end of file From fddf32078708fc0cb08911b90ceafa83a0326ca0 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 20:02:34 -0500 Subject: [PATCH 23/32] phpstan workflow changes --- .github/workflows/main.yml | 3 +++ tests/phpstan.neon.dist | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cd72d455..7d0aa51f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -72,6 +72,9 @@ jobs: - name: Install Composer dependencies run: php composer.phar install --prefer-dist --no-interaction + - name: Install Composer dependencies + run: ls plugins/MyPlot/tests + - name: Run PHPStan run: ./vendor/bin/phpstan analyze --no-progress --memory-limit=2G diff --git a/tests/phpstan.neon.dist b/tests/phpstan.neon.dist index c59a95a7..b34471c2 100644 --- a/tests/phpstan.neon.dist +++ b/tests/phpstan.neon.dist @@ -1,12 +1,4 @@ includes: - - tests/phpstan/configs/actual-problems.neon - - tests/phpstan/configs/gc-hacks.neon - - tests/phpstan/configs/php-bugs.neon - - tests/phpstan/configs/phpstan-bugs.neon - - tests/phpstan/configs/phpunit-wiring-tests.neon - - tests/phpstan/configs/pthreads-bugs.neon - - tests/phpstan/configs/runtime-type-checks.neon - - tests/phpstan/configs/spl-fixed-array-sucks.neon - vendor/phpstan/phpstan-phpunit/extension.neon - vendor/phpstan/phpstan-phpunit/rules.neon - vendor/phpstan/phpstan-strict-rules/rules.neon From 464a899d15916e9fd2c51bc86bbf8f90a765f186 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 20:02:50 -0500 Subject: [PATCH 24/32] phpstan workflow changes --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7d0aa51f..f492f6b8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -72,7 +72,7 @@ jobs: - name: Install Composer dependencies run: php composer.phar install --prefer-dist --no-interaction - - name: Install Composer dependencies + - name: LS run: ls plugins/MyPlot/tests - name: Run PHPStan From ebbb0b72f876bec1f94bb10e17effaa0e876e431 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 20:16:39 -0500 Subject: [PATCH 25/32] path fixed? --- .github/workflows/main.yml | 3 --- tests/phpstan.neon.dist | 18 ++---------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f492f6b8..cd72d455 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -72,9 +72,6 @@ jobs: - name: Install Composer dependencies run: php composer.phar install --prefer-dist --no-interaction - - name: LS - run: ls plugins/MyPlot/tests - - name: Run PHPStan run: ./vendor/bin/phpstan analyze --no-progress --memory-limit=2G diff --git a/tests/phpstan.neon.dist b/tests/phpstan.neon.dist index b34471c2..ae18c482 100644 --- a/tests/phpstan.neon.dist +++ b/tests/phpstan.neon.dist @@ -11,23 +11,9 @@ parameters: bootstrapFiles: - tests/phpstan/bootstrap.php scanDirectories: - - build - - tests/plugins/TesterPlugin - scanFiles: - - src/pocketmine/PocketMine.php - paths: - - build - src - - tests/phpunit - - tests/plugins/TesterPlugin - - plugins - excludePaths: - analyseAndScan: - - build/php - - build/preprocessor - analyse: - - src/pocketmine/block/StoneSlab.php #overrides STONE constant - - src/pocketmine/item/Potion.php #overrides WATER constant + paths: + - plugins/MyPlot/src dynamicConstantNames: - pocketmine\DEBUG - pocketmine\IS_DEVELOPMENT_BUILD From 2b5b0386d76257b24cc640378ce70f997bcb5b91 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 20:33:17 -0500 Subject: [PATCH 26/32] ignore errors unrelated to myplot directly --- tests/phpstan.neon.dist | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/phpstan.neon.dist b/tests/phpstan.neon.dist index ae18c482..983b84ad 100644 --- a/tests/phpstan.neon.dist +++ b/tests/phpstan.neon.dist @@ -12,6 +12,7 @@ parameters: - tests/phpstan/bootstrap.php scanDirectories: - src + - plugins paths: - plugins/MyPlot/src dynamicConstantNames: @@ -29,4 +30,8 @@ parameters: #what we actually need is something that accepts an infinite number of parameters, but in the absence of that, #we'll just fill it with 10 - it's very unlikely to encounter a callable with 10 parameters anyway. anyCallable: 'callable(never, never, never, never, never, never, never, never, never, never) : mixed' - anyClosure: '\Closure(never, never, never, never, never, never, never, never, never, never) : mixed' \ No newline at end of file + anyClosure: '\Closure(never, never, never, never, never, never, never, never, never, never) : mixed' + ignoreErrors: + - '#*form*#' + - '#*economyapi*#' + - '#*worldstyler*#' \ No newline at end of file From 5f4d820066c61d4aa16faa863df1ae1a724deea8 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 20:40:06 -0500 Subject: [PATCH 27/32] regex --- tests/phpstan.neon.dist | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpstan.neon.dist b/tests/phpstan.neon.dist index 983b84ad..4fe49147 100644 --- a/tests/phpstan.neon.dist +++ b/tests/phpstan.neon.dist @@ -32,6 +32,6 @@ parameters: anyCallable: 'callable(never, never, never, never, never, never, never, never, never, never) : mixed' anyClosure: '\Closure(never, never, never, never, never, never, never, never, never, never) : mixed' ignoreErrors: - - '#*form*#' - - '#*economyapi*#' - - '#*worldstyler*#' \ No newline at end of file + - '*form*' + - '*economyapi*' + - '*worldstyler*' \ No newline at end of file From 17f374bdd5e2aafb110dee0e339844d7a239a700 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 20:43:21 -0500 Subject: [PATCH 28/32] baseline? --- tests/phpstan.neon.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpstan.neon.dist b/tests/phpstan.neon.dist index 4fe49147..ce629869 100644 --- a/tests/phpstan.neon.dist +++ b/tests/phpstan.neon.dist @@ -2,7 +2,7 @@ includes: - vendor/phpstan/phpstan-phpunit/extension.neon - vendor/phpstan/phpstan-phpunit/rules.neon - vendor/phpstan/phpstan-strict-rules/rules.neon - - plugins/MyPlot/tests/phpstan-baseline.neon +# - plugins/MyPlot/tests/phpstan-baseline.neon parameters: level: 8 From 33fc1442ed701754e5186189ca736910d42bdeeb Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 20:48:14 -0500 Subject: [PATCH 29/32] caps matters here --- tests/phpstan.neon.dist | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/phpstan.neon.dist b/tests/phpstan.neon.dist index ce629869..13dbd371 100644 --- a/tests/phpstan.neon.dist +++ b/tests/phpstan.neon.dist @@ -32,6 +32,8 @@ parameters: anyCallable: 'callable(never, never, never, never, never, never, never, never, never, never) : mixed' anyClosure: '\Closure(never, never, never, never, never, never, never, never, never, never) : mixed' ignoreErrors: - - '*form*' + - '*Form*' + - '*pmforms*' - '*economyapi*' - - '*worldstyler*' \ No newline at end of file + - '*worldstyler*' + - '*EasyCommandAutofill*' \ No newline at end of file From e813524087d7efbbc321c92e37e43e92ebcd4fa7 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 21:40:58 -0500 Subject: [PATCH 30/32] more phpstan config work --- tests/phpstan-baseline.neon | 220 ------------------------------------ tests/phpstan.neon.dist | 7 +- 2 files changed, 4 insertions(+), 223 deletions(-) diff --git a/tests/phpstan-baseline.neon b/tests/phpstan-baseline.neon index 8c64c873..91d532bf 100644 --- a/tests/phpstan-baseline.neon +++ b/tests/phpstan-baseline.neon @@ -1,85 +1,5 @@ parameters: ignoreErrors: - - - message: "#^Only booleans are allowed in &&, mixed given on the right side\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/Commands.php - - - - message: "#^Cannot call method isSame\\(\\) on MyPlot\\\\Plot\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/EventListener.php - - - - message: "#^Anonymous function uses \\$this assigned to variable \\$plugin\\. Use \\$this directly in the function body\\.$#" - count: 8 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to method getSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" - count: 7 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to method removeSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" - count: 7 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to method setPosition\\(\\) on an unknown class muqsit\\\\worldstyler\\\\Selection\\.$#" - count: 12 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\CommonShape\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\Cuboid\\.$#" - count: 7 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Cannot call method setChunk\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Class muqsit\\\\worldstyler\\\\WorldStyler not found\\.$#" - count: 3 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Class onebone\\\\economyapi\\\\EconomyAPI not found\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Instantiated class muqsit\\\\worldstyler\\\\Selection not found\\.$#" - count: 5 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Method MyPlot\\\\MyPlot\\:\\:getPlotChunks\\(\\) should return array\\ but returns array\\\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Only booleans are allowed in &&, mixed given on the left side\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Only booleans are allowed in an if condition, mixed given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" count: 1 @@ -115,71 +35,6 @@ parameters: count: 1 path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/forms/subforms/RemoveHelperForm.php - - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/forms/subforms/UndenyPlayerForm.php - - - - message: "#^Method MyPlot\\\\provider\\\\DataProvider\\:\\:findEmptyPlotSquared\\(\\) has parameter \\$plots with no value type specified in iterable type array\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/DataProvider.php - - - - message: "#^Access to constant RET_SUCCESS on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Call to method addMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Call to method getLogger\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 4 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Call to method reduceMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Parameter \\$plugin of method MyPlot\\\\provider\\\\EconomySProvider\\:\\:__construct\\(\\) has invalid type onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Property MyPlot\\\\provider\\\\EconomySProvider\\:\\:\\$plugin has unknown class onebone\\\\economyapi\\\\EconomyAPI as its type\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Offset 0 does not exist on array\\|null\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php - - - - message: "#^Only booleans are allowed in &&, array\\|null given on the right side\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php - - - - message: "#^Only booleans are allowed in &&, array\\|false given on the right side\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php - - - - message: "#^Only booleans are allowed in an if condition, array\\|false given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AddHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" count: 1 @@ -225,21 +80,6 @@ parameters: count: 1 path: plugins/MyPlot/src/MyPlot/subcommand/DisposeSubCommand.php - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$player of class MyPlot\\\\forms\\\\subforms\\\\FillForm constructor expects pocketmine\\\\Player, pocketmine\\\\Player\\|null given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$position of method MyPlot\\\\MyPlot\\:\\:getPlotByPosition\\(\\) expects pocketmine\\\\level\\\\Position, pocketmine\\\\Player\\|null given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\FillSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" count: 1 @@ -325,63 +165,3 @@ parameters: count: 1 path: plugins/MyPlot/src/MyPlot/subcommand/WarpSubCommand.php - - - message: "#^Cannot call method isVectorInXZ\\(\\) on pocketmine\\\\math\\\\AxisAlignedBB\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/ClearPlotTask.php - - - - message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot access property \\$x on pocketmine\\\\level\\\\Position\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot access property \\$z on pocketmine\\\\level\\\\Position\\|null\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method getTiles\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/RoadFillTask.php - diff --git a/tests/phpstan.neon.dist b/tests/phpstan.neon.dist index 13dbd371..7b5eaf9e 100644 --- a/tests/phpstan.neon.dist +++ b/tests/phpstan.neon.dist @@ -2,10 +2,10 @@ includes: - vendor/phpstan/phpstan-phpunit/extension.neon - vendor/phpstan/phpstan-phpunit/rules.neon - vendor/phpstan/phpstan-strict-rules/rules.neon -# - plugins/MyPlot/tests/phpstan-baseline.neon + - plugins/MyPlot/tests/phpstan-baseline.neon parameters: - level: 8 + level: 7 checkMissingCallableSignature: true treatPhpDocTypesAsCertain: false bootstrapFiles: @@ -32,7 +32,8 @@ parameters: anyCallable: 'callable(never, never, never, never, never, never, never, never, never, never) : mixed' anyClosure: '\Closure(never, never, never, never, never, never, never, never, never, never) : mixed' ignoreErrors: - - '*Form*' + - '*CustomForm*' + - '*MenuForm*' - '*pmforms*' - '*economyapi*' - '*worldstyler*' From e51bffe8014eb6b0214cfd15c9fd35180bf2296f Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 21:56:52 -0500 Subject: [PATCH 31/32] Delete poggit Phpstan config --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cd72d455..c7a20834 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,6 +50,9 @@ jobs: - name: Replace PocketMine Phpstan config run: cp -f ./plugins/${{ github.event.repository.name }}/tests/phpstan.neon.dist phpstan.neon.dist + - name: Delete poggit Phpstan config + run: rm -f ./plugins/${{ github.event.repository.name }}/phpstan.neon.dist + - name: Setup PHP uses: pmmp/setup-php-action@e232f72a4330a07aae8418e8aa56b64efcdda636 with: From fe59daec9455172bc1b12c92f600de8bbba01592 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Sun, 14 Nov 2021 22:13:22 -0500 Subject: [PATCH 32/32] delete phpstan neon file --- phpstan.neon.dist | 394 ---------------------------------------------- 1 file changed, 394 deletions(-) delete mode 100644 phpstan.neon.dist diff --git a/phpstan.neon.dist b/phpstan.neon.dist deleted file mode 100644 index 3370193f..00000000 --- a/phpstan.neon.dist +++ /dev/null @@ -1,394 +0,0 @@ -parameters: - level: 7 - paths: - - /source/src - scanDirectories: - - /source/src - - /deps - bootstrapFiles: - - phar:///pocketmine/PocketMine-MP.phar/vendor/autoload.php - ignoreErrors: - - - message: "#^Only booleans are allowed in &&, mixed given on the right side\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/Commands.php - - - - message: "#^Cannot call method isSame\\(\\) on MyPlot\\\\Plot\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/EventListener.php - - - - message: "#^Anonymous function uses \\$this assigned to variable \\$plugin\\. Use \\$this directly in the function body\\.$#" - count: 8 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to method getSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" - count: 7 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to method removeSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\WorldStyler\\.$#" - count: 7 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to method setPosition\\(\\) on an unknown class muqsit\\\\worldstyler\\\\Selection\\.$#" - count: 12 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\CommonShape\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Call to static method fromSelection\\(\\) on an unknown class muqsit\\\\worldstyler\\\\shapes\\\\Cuboid\\.$#" - count: 7 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Cannot call method setChunk\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Class muqsit\\\\worldstyler\\\\WorldStyler not found\\.$#" - count: 3 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Class onebone\\\\economyapi\\\\EconomyAPI not found\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Instantiated class muqsit\\\\worldstyler\\\\Selection not found\\.$#" - count: 5 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Method MyPlot\\\\MyPlot\\:\\:getPlotChunks\\(\\) should return array\\ but returns array\\\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Only booleans are allowed in &&, mixed given on the left side\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Only booleans are allowed in an if condition, mixed given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlot.php - - - - message: "#^For loop initial assignment overwrites variable \\$X\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php - - - - message: "#^For loop initial assignment overwrites variable \\$x\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php - - - - message: "#^For loop initial assignment overwrites variable \\$z\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/MyPlotGenerator.php - - - - message: "#^Method MyPlot\\\\forms\\\\ComplexMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/forms/ComplexMyPlotForm.php - - - - message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onClose with no signature specified for Closure\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php - - - - message: "#^Method MyPlot\\\\forms\\\\SimpleMyPlotForm\\:\\:__construct\\(\\) has parameter \\$onSubmit with no signature specified for Closure\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/forms/SimpleMyPlotForm.php - - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/forms/subforms/RemoveHelperForm.php - - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/forms/subforms/UndenyPlayerForm.php - - - - message: "#^Method MyPlot\\\\provider\\\\DataProvider\\:\\:findEmptyPlotSquared\\(\\) has parameter \\$plots with no value type specified in iterable type array\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/DataProvider.php - - - - message: "#^Access to constant RET_SUCCESS on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Call to method addMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Call to method getLogger\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 4 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Call to method reduceMoney\\(\\) on an unknown class onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Parameter \\$plugin of method MyPlot\\\\provider\\\\EconomySProvider\\:\\:__construct\\(\\) has invalid type onebone\\\\economyapi\\\\EconomyAPI\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Property MyPlot\\\\provider\\\\EconomySProvider\\:\\:\\$plugin has unknown class onebone\\\\economyapi\\\\EconomyAPI as its type\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/EconomySProvider.php - - - - message: "#^Offset 0 does not exist on array\\|null\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php - - - - message: "#^Only booleans are allowed in &&, array\\|null given on the right side\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/provider/MySQLProvider.php - - - - message: "#^Only booleans are allowed in &&, array\\|false given on the right side\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php - - - - message: "#^Only booleans are allowed in an if condition, array\\|false given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/provider/SQLiteDataProvider.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AddHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/AddHelperSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\AutoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/AutoSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BiomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/BiomeSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\BuySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/BuySubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClaimSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/ClaimSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ClearSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/ClearSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\CloneSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/CloneSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DenyPlayerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/DenyPlayerSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\DisposeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/DisposeSubCommand.php - - - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$player of class MyPlot\\\\forms\\\\subforms\\\\FillForm constructor expects pocketmine\\\\Player, pocketmine\\\\Player\\|null given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$position of method MyPlot\\\\MyPlot\\:\\:getPlotByPosition\\(\\) expects pocketmine\\\\level\\\\Position, pocketmine\\\\Player\\|null given\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\FillSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/FillSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\GiveSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/GiveSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/HomeSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\HomesSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/HomesSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\InfoSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/InfoSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\KickSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/KickSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ListSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/ListSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MergeSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/MergeSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\MiddleSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/MiddleSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\NameSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/NameSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\PvpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/PvpSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\RemoveHelperSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/RemoveHelperSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\ResetSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/ResetSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SellSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/SellSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\SetOwnerSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/SetOwnerSubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\UnDenySubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/UnDenySubCommand.php - - - - message: "#^Parameter \\#1 \\$sender \\(pocketmine\\\\Player\\) of method MyPlot\\\\subcommand\\\\WarpSubCommand\\:\\:execute\\(\\) should be contravariant with parameter \\$sender \\(pocketmine\\\\command\\\\CommandSender\\) of method MyPlot\\\\subcommand\\\\SubCommand\\:\\:execute\\(\\)$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/subcommand/WarpSubCommand.php - - - - message: "#^Cannot call method isVectorInXZ\\(\\) on pocketmine\\\\math\\\\AxisAlignedBB\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/ClearPlotTask.php - - - - message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/CornerCorrectionTask.php - - - - message: "#^Cannot access property \\$x on pocketmine\\\\level\\\\Position\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot access property \\$z on pocketmine\\\\level\\\\Position\\|null\\.$#" - count: 2 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method getEntities\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method getTiles\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method getWorldHeight\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot call method setBlock\\(\\) on pocketmine\\\\level\\\\Level\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/FillPlotTask.php - - - - message: "#^Cannot access property \\$z on pocketmine\\\\math\\\\Vector3\\|null\\.$#" - count: 1 - path: plugins/MyPlot/src/MyPlot/task/RoadFillTask.php \ No newline at end of file