Skip to content

Commit

Permalink
Use component type literal for instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Oct 1, 2023
1 parent 96b897c commit 434fdd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"xp-forge/rest-api": "^4.0",
"xp-forge/web-auth": "^3.0",
"xp-lang/php-compact-methods": "^1.0",
"xp-lang/xp-generics": "^0.6",
"xp-lang/xp-generics": "^0.7",
"php" : ">=7.0.0"
},
"require-dev" : {
Expand Down
2 changes: 1 addition & 1 deletion src/test/php/de/thekid/shorturl/unittest/ApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ abstract class ApiTest<T> {
/** Test helper */
protected function test(function(T): Response $call): array<int, mixed> {
try {
$e= $call($T->newInstance(new TestingUrls(self::URLS)))->export();
$e= $call(new T(new TestingUrls(self::URLS)))->export();
} catch (Error $e) {
$e= ['status' => $e->status(), 'body' => ['error' => ['message' => $e->getMessage()]]];
}
Expand Down

0 comments on commit 434fdd3

Please sign in to comment.