Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches: [main]

jobs:
pre-commit:
phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -17,4 +17,4 @@ jobs:
php-version: "8.3"
tools: composer
- run: composer install --dev
- run: ./vendor/bin/phpstan --memory-limit=-1 analyse ./resources/
- run: ./vendor/bin/phpstan analyse -c phpstan.neon
5 changes: 5 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
level: 0
paths:
- resources
- test
2 changes: 1 addition & 1 deletion test/functional/AccountDeletionRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ private function assertNumberAccountDeletionRequests(int $x)
$this->assertTrue($USER->hasRequestedAccountDeletion());
$this->assertTrue($SQL->accDeletionRequestExists($USER->uid));
} else {
throw new RuntimeError("x must not be negative");
throw new RuntimeException("x must not be negative");
}
$this->assertEquals($x, $this->getNumberAccountDeletionRequests());
}
Expand Down
2 changes: 1 addition & 1 deletion test/functional/PiBecomeRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ private function assertNumberPiBecomeRequests(int $x)
} elseif ($x > 0) {
$this->assertTrue($SQL->requestExists($USER->uid));
} else {
throw new RuntimeError("x must not be negative");
throw new RuntimeException("x must not be negative");
}
$this->assertEquals($x, $this->getNumberPiBecomeRequests());
}
Expand Down
2 changes: 1 addition & 1 deletion test/functional/PiMemberDenyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static function setUpBeforeClass(): void

private function denyUser(string $uid)
{
post(__DIR__ . "/../../webroot/panel/pi.php", [
http_post(__DIR__ . "/../../webroot/panel/pi.php", [
"form_type" => "userReq",
"action" => "approve",
"uid" => $uid,
Expand Down