This repository was archived by the owner on Jul 19, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -27,13 +27,17 @@ class Curl {
2727 /**
2828 * Default timeout.
2929 *
30+ * @since 1.0.0
31+ *
3032 * @var int
3133 */
3234 private static $ _timeout = 30 ;
3335
3436 /**
3537 * Useragent default if another is not indicated.
3638 *
39+ * @since 1.0.0
40+ *
3741 * @var string
3842 */
3943 private static $ _useragent = 'Mozilla/5.0 (Windows NT 5.1; rv:31.0) ' .
@@ -42,13 +46,17 @@ class Curl {
4246 /**
4347 * Headers default if another is not indicated.
4448 *
49+ * @since 1.0.0
50+ *
4551 * @var array
4652 */
4753 private static $ _headers = array ('Content-Type:text/html ' );
4854
4955 /**
5056 * Make request and get response website.
51- *
57+ *
58+ * @since 1.0.0
59+ *
5260 * @param array $params
5361 * string $params['url'] → the request URL
5462 * string $params['referer'] → the referrer URL
@@ -130,6 +138,8 @@ public static function request(array $params, string $results = 'array') {
130138 /**
131139 * Check the protocol site (http | https) and get the current url.
132140 *
141+ * @since 1.0.0
142+ *
133143 * @return string → full url
134144 */
135145 private static function getUrl (): string {
@@ -141,4 +151,4 @@ private static function getUrl(): string {
141151
142152 return 'http:// ' . $ _SERVER ['HTTP_HOST ' ];
143153 }
144- }
154+ }
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ class CurlTest {
2626
2727 /**
2828 * Get request.
29+ *
30+ * @since 1.0.0
2931 */
3032 public static function testGetRequest () {
3133
@@ -39,6 +41,8 @@ public static function testGetRequest() {
3941
4042 /**
4143 * Post request.
44+ *
45+ * @since 1.0.0
4246 */
4347 public static function testPostRequest () {
4448
@@ -59,6 +63,8 @@ public static function testPostRequest() {
5963
6064 /**
6165 * Put request.
66+ *
67+ * @since 1.0.0
6268 */
6369 public static function testPutRequest () {
6470
@@ -79,6 +85,8 @@ public static function testPutRequest() {
7985
8086 /**
8187 * Delete request.
88+ *
89+ * @since 1.0.0
8290 */
8391 public static function testDeleteRequest () {
8492
@@ -99,6 +107,8 @@ public static function testDeleteRequest() {
99107
100108 /**
101109 * Response error.
110+ *
111+ * @since 1.0.0
102112 */
103113 public static function testResponseError () {
104114
@@ -112,6 +122,8 @@ public static function testResponseError() {
112122
113123 /**
114124 * Response error.
125+ *
126+ * @since 1.0.0
115127 */
116128 public static function testUnknownTypeError () {
117129
@@ -122,4 +134,4 @@ public static function testUnknownTypeError() {
122134
123135 Curl::request ($ data );
124136 }
125- }
137+ }
You can’t perform that action at this time.
0 commit comments