Page MenuHomeDevCentral

D1816.id4596.diff
No OneTemporary

D1816.id4596.diff

diff --git a/traits/assertHttp.php b/traits/assertHttp.php
--- a/traits/assertHttp.php
+++ b/traits/assertHttp.php
@@ -3,22 +3,16 @@
trait assertHttp {
/**
* Asserts the HTTP response code of an URL matches the expected code
- *
- * @param int $expectedCode the expected HTTP response code
- * @param string $url the URL to check
- * @param string $comment the comment to output if the test fails [facultative]
*/
- private function assertHttpResponseCode ($expectedCode, $url, $comment = '') : void {
+ private function assertHttpResponseCode (int $expectedCode, string $url, string $comment = '') : void {
$actualCode = $this->getHttpResponseCode($url);
$this->assertEquals($expectedCode, $actualCode, $comment);
}
/**
* Gets the HTTP response code of the specified URL
- *
- * @param string $url
*/
- private function getHttpResponseCode ($url) : int {
+ private function getHttpResponseCode (string $url) : int {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERAGENT, "Nasqueron-Ops-Tests");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 08:50 (11 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259875
Default Alt Text
D1816.id4596.diff (1 KB)

Event Timeline