From 4f13d93af2371eef7798cfe72a417cceec514d4b Mon Sep 17 00:00:00 2001 From: rugk Date: Wed, 3 Sep 2025 13:53:51 +0000 Subject: [PATCH] style: use explicit types --- tst/YourlsProxyTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tst/YourlsProxyTest.php b/tst/YourlsProxyTest.php index 1b29c9d0..3ed503b1 100644 --- a/tst/YourlsProxyTest.php +++ b/tst/YourlsProxyTest.php @@ -50,14 +50,14 @@ class YourlsProxyTest extends TestCase /** * @dataProvider providerInvalidUrl */ - public function testImvalidUrl($url) + public function testImvalidUrl($url): void { $yourls = new YourlsProxy($this->_conf, $url); $this->assertTrue($yourls->isError()); $this->assertEquals($yourls->getError(), 'Invalid URL given.'); } - public function providerInvalidUrl() { + public function providerInvalidUrl(): array { return [ [''], [' '], @@ -75,7 +75,7 @@ class YourlsProxyTest extends TestCase * * @return void */ - public function testForeignUrlUsingUsernameTrick() + public function testForeignUrlUsingUsernameTrick(): void { $yourls = new YourlsProxy($this->_conf, 'https://example.com/@foreign.malicious.example?foo#bar'); $this->assertTrue($yourls->isError()); @@ -85,14 +85,14 @@ class YourlsProxyTest extends TestCase /** * @dataProvider providerForeignUrl */ - public function testForeignUrl($url) + public function testForeignUrl($url): void { $yourls = new YourlsProxy($this->_conf, $url); $this->assertTrue($yourls->isError()); $this->assertEquals($yourls->getError(), 'Trying to shorten a URL that isn\'t pointing at our instance.'); } - public function providerForeignUrl() { + public function providerForeignUrl(): array { return [ ['ftp://example.com/?n=np'], // wrong protocol ['https://other.example.com/?foo#bar'], // wrong domain