Skip to content

Commit 0146056

Browse files
authored
phpstan changes (#341)
1 parent 16775d4 commit 0146056

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

.github/workflows/phpstan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches: [main]
77

88
jobs:
9-
pre-commit:
9+
phpstan:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v3
@@ -17,4 +17,4 @@ jobs:
1717
php-version: "8.3"
1818
tools: composer
1919
- run: composer install --dev
20-
- run: ./vendor/bin/phpstan --memory-limit=-1 analyse ./resources/
20+
- run: ./vendor/bin/phpstan analyse -c phpstan.neon

phpstan.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
parameters:
2+
level: 0
3+
paths:
4+
- resources
5+
- test

test/functional/AccountDeletionRequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ private function assertNumberAccountDeletionRequests(int $x)
1414
$this->assertTrue($USER->hasRequestedAccountDeletion());
1515
$this->assertTrue($SQL->accDeletionRequestExists($USER->uid));
1616
} else {
17-
throw new RuntimeError("x must not be negative");
17+
throw new RuntimeException("x must not be negative");
1818
}
1919
$this->assertEquals($x, $this->getNumberAccountDeletionRequests());
2020
}

test/functional/PiBecomeRequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ private function assertNumberPiBecomeRequests(int $x)
1313
} elseif ($x > 0) {
1414
$this->assertTrue($SQL->requestExists($USER->uid));
1515
} else {
16-
throw new RuntimeError("x must not be negative");
16+
throw new RuntimeException("x must not be negative");
1717
}
1818
$this->assertEquals($x, $this->getNumberPiBecomeRequests());
1919
}

test/functional/PiMemberDenyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static function setUpBeforeClass(): void
1717

1818
private function denyUser(string $uid)
1919
{
20-
post(__DIR__ . "/../../webroot/panel/pi.php", [
20+
http_post(__DIR__ . "/../../webroot/panel/pi.php", [
2121
"form_type" => "userReq",
2222
"action" => "approve",
2323
"uid" => $uid,

0 commit comments

Comments
 (0)