Skip to content

Commit

Permalink
Merge pull request #5 from lentex/dev/housekeeping
Browse files Browse the repository at this point in the history
Housekeeping
  • Loading branch information
lentex authored Nov 12, 2024
2 parents 95de29a + 71de523 commit ebc7aa7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
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

0 comments on commit ebc7aa7

Please sign in to comment.