Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Housekeeping #5

Merged
merged 4 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
matrix:
php: [ "8.3" ]

runs-on: [self-hosted, linux, x64]
runs-on: [ubuntu-latest]
name: PHP@${{ matrix.php }}

steps:
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"type": "package",
"description": "The Gaudigame Engine",
"require": {
"php": "8.3.*"
"php": "8.3.* | 8.4.*"
},
"require-dev": {
"laravel/pint": "^1.14",
"pestphp/pest": "^2.34",
"pestphp/pest-plugin-type-coverage": "^2.8",
"phpstan/phpstan": "^1.10.59"
"laravel/pint": "^1.0",
"pestphp/pest": "^3.0",
"pestphp/pest-plugin-type-coverage": "^3.0",
"phpstan/phpstan": "^1.0"
},
"autoload": {
"psr-4": {
Expand Down
10 changes: 3 additions & 7 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,19 @@ parameters:
level: max

treatPhpDocTypesAsCertain: false
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
reportUnmatchedIgnoredErrors: true

ignoreErrors:
# Pest implicitly binds $this to the current test case
# @see https://pestphp.com/docs/underlying-test-case
-
message: '#^Undefined variable: \$this$#'
reportUnmatched: false
path: tests/*
-
message: '#^Call to an undefined method Pest\\Expectation<([a-zA-Z|\\\\]+)>\:\:[a-zA-Z]+\(\)\.$#'
reportUnmatched: false
path: tests/*
-
message: "#^Call to an undefined method Pest\\\\PendingCalls\\\\TestCall\\:\\:expect\\(\\)\\.$#"
reportUnmatched: false
path: tests/*
-
message: "#^Access to an undefined property PHPUnit\\\\Framework\\\\TestCase\\:\\:\\$#"
path: tests/*

10 changes: 5 additions & 5 deletions tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
return $this;
});

expect()->extend('toBeExactGuess', function (float $boost = null) {
expect()->extend('toBeExactGuess', function (?float $boost = null) {
$expectedPoints = (float) (new DefaultCalculationModel())->getPointsForExactGuess();
$expectedPoints = $boost ? $expectedPoints * $boost : $expectedPoints;

Expand All @@ -33,7 +33,7 @@
return $this;
});

expect()->extend('toBeWrongGuess', function (float $boost = null) {
expect()->extend('toBeWrongGuess', function (?float $boost = null) {
$expectedPoints = (float) (new DefaultCalculationModel())->getPointsForWrongGuess();
$expectedPoints = $boost ? $expectedPoints * $boost : $expectedPoints;

Expand All @@ -47,7 +47,7 @@
return $this;
});

expect()->extend('toBeExactGapGuess', function (float $boost = null) {
expect()->extend('toBeExactGapGuess', function (?float $boost = null) {
$expectedPoints = (float) (new DefaultCalculationModel())->getPointsForExactGap();
$expectedPoints = $boost ? $expectedPoints * $boost : $expectedPoints;

Expand All @@ -61,7 +61,7 @@
return $this;
});

expect()->extend('toBeCorrectTendencyGuess', function (float $boost = null) {
expect()->extend('toBeCorrectTendencyGuess', function (?float $boost = null) {
$expectedPoints = (float) (new DefaultCalculationModel())->getPointsForTendency();
$expectedPoints = $boost ? $expectedPoints * $boost : $expectedPoints;

Expand All @@ -75,7 +75,7 @@
return $this;
});

expect()->extend('toBeDrawGapGuess', function (float $boost = null) {
expect()->extend('toBeDrawGapGuess', function (?float $boost = null) {
$expectedPoints = (float) (new DefaultCalculationModel())->getPointsForDrawGap();
$expectedPoints = $boost ? $expectedPoints * $boost : $expectedPoints;

Expand Down
Loading