Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3769451
D1816.id4596.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D1816.id4596.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 14:40 (4 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259875
Default Alt Text
D1816.id4596.diff (1 KB)
Attached To
Mode
D1816: Switch PHPDoc comments to PHP 7 methods signatures types
Attached
Detach File
Event Timeline
Log In to Comment